OSDN Git Service

rtc: s35390a: handle invalid RTC time
authorFabien Lahoudere <fabien.lahoudere@collabora.co.uk>
Wed, 5 Jul 2017 08:02:29 +0000 (10:02 +0200)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Sun, 30 Jul 2017 22:17:39 +0000 (00:17 +0200)
commit16486d0c1c659d4ab502c5bea408654287edcb74
treecdc8c4b417cd5554a52ba90a92dd63b532d41297
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877
rtc: s35390a: handle invalid RTC time

If RTC time have been altered by low voltage, we notify users
that RTC time is invalid by returning -EINVAL.
The RTC time needs to be set correctly to clear the invalid flag.

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-s35390a.c