rtc: pm8xxx: Fix issue in RTC write path
authorMohit Aggarwal <maggarwa@codeaurora.org>
Tue, 21 Apr 2020 12:40:07 +0000 (13:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Apr 2020 05:59:09 +0000 (07:59 +0200)
commitb0a7e39e8a53f474342e727e1edbdb4bd0952f4f
treed89b52435d770ede016a71f10125c0956831404b
parentd1310452738952eb82c5adaf655772456f352658
rtc: pm8xxx: Fix issue in RTC write path

[ Upstream commit 83220bf38b77a830f8e62ab1a0d0408304f9b966 ]

In order to set time in rtc, need to disable
rtc hw before writing into rtc registers.

Also fixes disabling of alarm while setting
rtc time.

Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/rtc/rtc-pm8xxx.c