]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: pcf8523: properly handle oscillator stop bit
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Thu, 3 Mar 2016 08:55:47 +0000 (09:55 +0100)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Mon, 14 Mar 2016 16:08:30 +0000 (17:08 +0100)
commite97675dd4896487c5c07bc9b650b3e26a342b457
treec3917e54ee7928b6bda3d84578f1a9cfb3c68a86
parent410509e34a99c266c49a1e38b842e7183c5c08da
rtc: pcf8523: properly handle oscillator stop bit

The time and date register of the pcf8223 are undefined after a power
reset. Properly handle the OS bit and return -EINVAL when that bit is set.

It is properly removed when setting the time.

This solves an issue where the time and date may be valid for
rtc_valid_tm() but is not the current time.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-pcf8523.c