rtc: ds1307: rx8130: honor Voltage Loss Flag when reading the time
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 25 Jan 2019 14:35:57 +0000 (15:35 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 7 Feb 2019 19:55:46 +0000 (20:55 +0100)
commit501f98266caddd2b76cdf10093105aa2318d1421
tree571ef45be792e102fb8e99361d22733277112a24
parent3ffd4a2fcf52c1170654c68459fff40773a729ea
rtc: ds1307: rx8130: honor Voltage Loss Flag when reading the time

When voltage dropped since the RTC was last set the reported time is not
reliable. In this case return an error indicator instead of a bogus
time.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-ds1307.c