aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linaro.org>2018-10-18 04:52:27 -0400
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-10-24 20:35:38 -0400
commit7db5adfa63167dac548022c973e00da7f56ffb72 (patch)
tree3b09ead1185b50a5918400d5f5623366cd7689bf /drivers/rtc
parenta86d6b23ed9729d47b2818857d8fa5d8e3f8284a (diff)
rtc: sc27xx: Clear SPG value update interrupt status
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> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-sc27xx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-sc27xx.c b/drivers/rtc/rtc-sc27xx.c
index 8afba125ad71..6ac56538682e 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)
172 return ret; 172 return ret;
173 } 173 }
174 174
175 return 0; 175 return regmap_write(rtc->regmap, rtc->base + SPRD_RTC_INT_CLR,
176 SPRD_RTC_SPG_UPD_EN);
176} 177}
177 178
178static int sprd_rtc_get_secs(struct sprd_rtc *rtc, enum sprd_rtc_reg_types type, 179static int sprd_rtc_get_secs(struct sprd_rtc *rtc, enum sprd_rtc_reg_types type,