]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rtc: ds1307: stop disabling alarms on probe
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 3 Mar 2025 22:37:44 +0000 (23:37 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 6 Mar 2025 21:12:14 +0000 (22:12 +0100)
It is a bad practice to disable alarms on probe or remove as this will
prevent alarms across reboots.

Link: https://lore.kernel.org/r/20250303223744.1135672-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-ds1307.c

index 872e0b679be4814f3108bae35395a17f5bfcd63c..5efbe69bf5ca8cbc2a325cf2797afcd14f3760bf 100644 (file)
@@ -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]);