public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc: pcf8523: fix alarm interrupt disabling
@ 2021-11-03 15:22 Vincent Whitchurch
  2021-11-30 23:19 ` Alexandre Belloni
  0 siblings, 1 reply; 3+ messages in thread
From: Vincent Whitchurch @ 2021-11-03 15:22 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni
  Cc: kernel, Vincent Whitchurch, linux-rtc, linux-kernel

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.

Fixes: 13e37b7fb75dfaeb4 ("rtc: pcf8523: add alarm support")
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
---
 drivers/rtc/rtc-pcf8523.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-pcf8523.c b/drivers/rtc/rtc-pcf8523.c
index 8b6fb20774bf..e26477267451 100644
--- a/drivers/rtc/rtc-pcf8523.c
+++ b/drivers/rtc/rtc-pcf8523.c
@@ -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;
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-01  8:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-03 15:22 [PATCH] rtc: pcf8523: fix alarm interrupt disabling Vincent Whitchurch
2021-11-30 23:19 ` Alexandre Belloni
2021-12-01  8:49   ` Vincent Whitchurch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox