]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: pcf85063: Always clear EXT_TEST from set_time
authorPhil Elwell <phil@raspberrypi.com>
Fri, 15 Oct 2021 11:12:08 +0000 (12:12 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 15 Oct 2021 19:09:38 +0000 (21:09 +0200)
commitede004e0a9826010d6cf6c0c3ef85224eba58e37
tree8c0778f7656b32ba491bc285ce6fcea22c7f5961
parent7fd805f25d5831de9c8d6a3c00b269b8f944d441
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>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20211015111208.1757110-1-phil@raspberrypi.com
drivers/rtc/rtc-pcf85063.c