Skip to content

Commit 60cfac1

Browse files
vwaxalexandrebelloni
authored andcommitted
rtc: pcf8563: clear RTC_FEATURE_ALARM if no irq
If there is no IRQ hooked up, clear RTC_FEATURE_ALARM to make the core ensure that userspace is made aware that alarms are not supported. Signed-off-by: Vincent Whitchurch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 0462681 commit 60cfac1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/rtc/rtc-pcf8563.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,8 @@ static int pcf8563_probe(struct i2c_client *client)
567567
client->irq);
568568
return err;
569569
}
570+
} else {
571+
clear_bit(RTC_FEATURE_ALARM, pcf8563->rtc->features);
570572
}
571573

572574
err = devm_rtc_register_device(pcf8563->rtc);

0 commit comments

Comments
 (0)