rtc: pcf8523: fix alarm interrupt disabling
PATCH 1/1 rtc: pcf8523: fix alarm interrupt disabling
Fix the driver to actually disable the IRQ and not overwrite other bits in the CONTROL_1 register when it is asked to disable the alarm interrupt.
Compile-tested only.
--- drivers/rtc/rtc-pcf8523.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-pcf8523.c +1 -1
@@ -347,7 +347,7 @@ static int pcf8523_irq_enable(struct device *dev, unsigned int enabled)if (err <0 )return err; - value &=PCF8523_CONTROL1_AIE ; + value &= ~PCF8523_CONTROL1_AIE ;if (enabled) value |=PCF8523_CONTROL1_AIE ;
Signature · 1 line
2.28.0
Alexandre Belloni
maintainerHello,
Quoted 17 lines · Vincent Whitchurch
Fix the driver to actually disable the IRQ and not overwrite other bits in the
CONTROL_1register when it is asked to disable the alarm interrupt.Compile-tested only.
Fixes 13e37b7fb75dfaeb4 ("rtc: pcf8523: add alarm support")Signed-off-by Vincent Whitchurch <[email protected]>--- drivers/rtc/rtc-pcf8523.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/rtc/rtc-pcf8523.c +0
-0
drivers/rtc/rtc-pcf8523.c static int pcf8523_irq_enable(struct device *dev, unsigned int enabled) · line 351
Quoted 6 lines
drivers/rtc/rtc-pcf8523.c +1
-1@@ -347,7 +347,7 @@ static int pcf8523_irq_enable(struct device *dev, unsigned int enabled)if (err <0 )return err; - value &=PCF8523_CONTROL1_AIE ; + value &= ~PCF8523_CONTROL1_AIE ;
I was going to apply that but it seems this was fixed by:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=91f3849d956d58073ef55e01f2e8871dc30847a5
Quoted 5 lines
drivers/rtc/rtc-pcf8523.c +0
-0if (enabled) value |=PCF8523_CONTROL1_AIE ;Signature · 1 line
2.28.0
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 21 lines · Alexandre Belloni
Quoted 20 lines · Vincent Whitchurch
Fix the driver to actually disable the IRQ and not overwrite other bits in the
CONTROL_1register when it is asked to disable the alarm interrupt.Compile-tested only.
Fixes 13e37b7fb75dfaeb4 ("rtc: pcf8523: add alarm support")Signed-off-by Vincent Whitchurch <[email protected]>--- drivers/rtc/rtc-pcf8523.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/rtc/rtc-pcf8523.c +0
-0@@ -347,7 +347,7 @@ static int pcf8523_irq_enable(struct device *dev, unsigned int enabled)if (err <0 )return err;
Quoted 6 lines
drivers/rtc/rtc-pcf8523.c static int pcf8523_irq_enable(struct device *dev, unsigned int enabled) · line 351
Quoted 3 lines
drivers/rtc/rtc-pcf8523.c +1
-1- value &=PCF8523_CONTROL1_AIE ; + value &= ~PCF8523_CONTROL1_AIE ;I was going to apply that but it seems this was fixed by:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=91f3849d956d58073ef55e01f2e8871dc30847a5
Yes, you're right, sorry. I had only checked mainline at the time I wrote the patch and not what was queued up in linux-next.