Skip to content

Commit

Permalink
rtc: sc27xx: Clear SPG value update interrupt status
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Baolin Wang authored and Alexandre Belloni committed Oct 25, 2018
1 parent a86d6b2 commit 7db5adf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/rtc/rtc-sc27xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7db5adf

Please sign in to comment.