rtc: sc27xx: Always read normal alarm when registering RTC device
authorBaolin Wang <baolin.wang@linaro.org>
Thu, 18 Oct 2018 08:52:30 +0000 (16:52 +0800)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 25 Oct 2018 00:35:42 +0000 (02:35 +0200)
commit3822d1bb0df18aa28930f19bc46e0704aea1be0f
treedab8e4b37be5c2c83d7701485def1454513bcef8
parentbf2c532b67fc077051e17de4a1304a83e5ca5b15
rtc: sc27xx: Always read normal alarm when registering RTC device

When registering one RTC device, it will check to see if there is an
alarm already set in RTC hardware by reading RTC alarm, at this time
we should always read the normal alarm put in always-on region by
checking the rtc->registered flag.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-sc27xx.c