diff mbox series

[2/5] rtc: sc27xx: Clear SPG value update interrupt status

Message ID 43a12635d57b134fc55d664af8f715b31bbc5f3b.1539851865.git.baolin.wang@linaro.org
State Accepted
Commit 7db5adfa63167dac548022c973e00da7f56ffb72
Headers show
Series Fix some issues for RTC alarm function | expand

Commit Message

(Exiting) Baolin Wang Oct. 18, 2018, 8:52 a.m. UTC
We should clear the SPG value update interrupt status once the SPG value
is updated successfully, in case incorrect status validation for next time.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>

---
 drivers/rtc/rtc-sc27xx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
1.7.9.5
diff mbox series

Patch

diff --git a/drivers/rtc/rtc-sc27xx.c b/drivers/rtc/rtc-sc27xx.c
index 8afba12..6ac5653 100644
--- a/drivers/rtc/rtc-sc27xx.c
+++ b/drivers/rtc/rtc-sc27xx.c
@@ -172,7 +172,8 @@  static int sprd_rtc_lock_alarm(struct sprd_rtc *rtc, bool lock)
 		return ret;
 	}
 
-	return 0;
+	return regmap_write(rtc->regmap, rtc->base + SPRD_RTC_INT_CLR,
+			    SPRD_RTC_SPG_UPD_EN);
 }
 
 static int sprd_rtc_get_secs(struct sprd_rtc *rtc, enum sprd_rtc_reg_types type,