]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: jz4740: rework invalid time detection
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 30 Apr 2019 09:28:20 +0000 (11:28 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 30 Apr 2019 09:50:22 +0000 (11:50 +0200)
commit22d654e3b0061dcbdd26d2bb3d3b2b0ce55d8d6c
treeb65c529efa59ec73bb5bc0b8a120222ce01b6ba7
parentf4dad65d60ce6b76627508f0d9b1a0677588d3f9
rtc: jz4740: rework invalid time detection

The scratchpad register is used to detect an invalid time when power to the
RTC has been lost. Instead of deleting that precious information and set
the time to the UNIX epoch, forward it to userspace.

Tested-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-jz4740.c