rtc: pcf2127: use OFS flag to detect unreliable date and warn the user
authorAndrea Scian <andrea.scian@dave.eu>
Tue, 16 Jun 2015 09:39:47 +0000 (11:39 +0200)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Sat, 5 Sep 2015 11:19:06 +0000 (13:19 +0200)
commit653ebd75e9e469e99a40ab14128d915386dc78c6
tree1afde5a872c74e71f4e06fcdcb895757661bba88
parent821f51c4da869706356ddecfeeac286bf4df9b98
rtc: pcf2127: use OFS flag to detect unreliable date and warn the user

The PCF2127 datasheet states that it's wrong to say that the date in
unreliable if BLF (battery low flag) is set but instead, OSF (seconds
register) should be used to check if oscillator, for any reason, stopped.
Battery may be low (usually below 2V5 threshold) but the date may be anyway
correct (typically date is unreliable when input voltage is below 1V2).

Signed-off-by: Andrea Scian <andrea.scian@dave.eu>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-pcf2127.c