rtc: pcf85063: Always clear EXT_TEST from set_time
authorPhil Elwell <phil@raspberrypi.com>
Fri, 15 Oct 2021 10:45:36 +0000 (11:45 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 21 Mar 2022 16:04:26 +0000 (16:04 +0000)
commit6f58bc8778b86b340bef6b95af1a7fa7be280ab2
treeb69512262edce316efbd9b795b21a9bbc903387f
parentfc2a704d2cc37fbb8dd2ec7ac136fa551f7f1700
rtc: pcf85063: Always clear EXT_TEST from set_time

Power-on reset after the insertion of a battery does not always complete
successfully, leading to corrupted register content. The EXT_TEST bit
will stop the clock from running, but currently the driver will never
recover.

Safely handle the erroneous state by clearing EXT_TEST as part of the
usual set_time method.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
drivers/rtc/rtc-pcf85063.c