rtc: pm8xxx: Read ALARM_EN and update to alarm enabled status
authorGuixiong Wei <guixiong@codeaurora.org>
Thu, 24 Dec 2020 11:28:57 +0000 (19:28 +0800)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 12 Jan 2021 22:46:46 +0000 (23:46 +0100)
commit121f54efc3fb9854f581fede4f719a4aef7ed5b3
treec4395c95f2133477b5bb8c8c9d799b03469c92f6
parent5c8fe583cce542aa0b84adc939ce85293de36e5e
rtc: pm8xxx: Read ALARM_EN and update to alarm enabled status

ALARM_EN status is retained in PMIC register after device shutdown
if poweron_alarm is enabled. Read it to make sure the driver has
consistent value with the register status.

Signed-off-by: Guixiong Wei <guixiong@codeaurora.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/1608809337-18852-1-git-send-email-guixiong@codeaurora.org
drivers/rtc/rtc-pm8xxx.c