rtc: rv3029: correctly handle PON and VLOW2
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Sat, 14 Dec 2019 22:10:17 +0000 (23:10 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 18 Dec 2019 09:38:04 +0000 (10:38 +0100)
commitcff2e4d278265b595864f882f17f60509713c913
tree8e20fc48018a7db5ce8c3f507c94aee0f96fb6d5
parentf630f728a9b114865bcfe16c1d91dff11e89a4b9
rtc: rv3029: correctly handle PON and VLOW2

In case the data is invalid (PON or VLOW2 are set in STATUS, explicitly
tell userspace that the time is invalid. Only remove VLOW2 when setting a
new valid time.

Link: https://lore.kernel.org/r/20191214221022.622482-12-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-rv3029c2.c