diff options
author | Vincent Whitchurch <vincent.whitchurch@axis.com> | 2022-03-01 16:12:20 +0300 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2022-11-17 01:12:50 +0300 |
commit | 60cfac17d0a1c28cd41959e95ba1e0ecc47165e7 (patch) | |
tree | 061929c21671d55db4c0b28294cf957d9942cecc /drivers/rtc | |
parent | 0462681e207ccc44778a77b3297af728b1cf5b9f (diff) | |
download | linux-60cfac17d0a1c28cd41959e95ba1e0ecc47165e7.tar.xz |
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 <vincent.whitchurch@axis.com>
Link: https://lore.kernel.org/r/20220301131220.4011810-1-vincent.whitchurch@axis.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-pcf8563.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c index 11fa9788558b..0a7fd9478465 100644 --- a/drivers/rtc/rtc-pcf8563.c +++ b/drivers/rtc/rtc-pcf8563.c @@ -567,6 +567,8 @@ static int pcf8563_probe(struct i2c_client *client) client->irq); return err; } + } else { + clear_bit(RTC_FEATURE_ALARM, pcf8563->rtc->features); } err = devm_rtc_register_device(pcf8563->rtc); |