rtc: pm8xxx: clear alarm register when alarm is not enabled
author韩科才 <hankecai@vivo.com>
Sat, 21 Mar 2020 11:50:17 +0000 (19:50 +0800)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 23 Mar 2020 08:27:17 +0000 (09:27 +0100)
commit34ce29774dadc24ac1a529c562c325db2b77c7b4
tree27285562a01f00972a967919a0cf91f618178c14
parent4828a82e29eb77628526fd6b92d528c2f724cb32
rtc: pm8xxx: clear alarm register when alarm is not enabled

Clear alarm register when alarm is not enabled otherwise the consumer
may still start alarm timer if it find the alarm register is not zero.

Signed-off-by: hankecai <hankecai@vivo.com>
Link: https://lore.kernel.org/r/APoAZgAaCEiRpKG6PlzreaqE.1.1584791417367.Hmail.hankecai@vivo.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-pm8xxx.c