* [PATCH] rtc: ds1307: stop disabling alarms on probe
@ 2025-03-03 22:37 alexandre.belloni
0 siblings, 0 replies; only message in thread
From: alexandre.belloni @ 2025-03-03 22:37 UTC (permalink / raw)
To: Alexandre Belloni; +Cc: linux-rtc, linux-kernel
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
It is a bad practice to disable alarms on probe or remove as this will
prevent alarms across reboots.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
drivers/rtc/rtc-ds1307.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 872e0b679be4..5efbe69bf5ca 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -1807,10 +1807,8 @@ static int ds1307_probe(struct i2c_client *client)
* For some variants, be sure alarms can trigger when we're
* running on Vbackup (BBSQI/BBSQW)
*/
- if (want_irq || ds1307_can_wakeup_device) {
+ if (want_irq || ds1307_can_wakeup_device)
regs[0] |= DS1337_BIT_INTCN | chip->bbsqi_bit;
- regs[0] &= ~(DS1337_BIT_A2IE | DS1337_BIT_A1IE);
- }
regmap_write(ds1307->regmap, DS1337_REG_CONTROL,
regs[0]);
--
2.48.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-03-03 22:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-03 22:37 [PATCH] rtc: ds1307: stop disabling alarms on probe alexandre.belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®