lkml.org 
[lkml]   [2021]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] rtc: pcf8523: fix alarm interrupt disabling
Date
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
\
 
 \ /
  Last update: 2021-11-03 16:23    [W:0.420 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site