summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/rtc
diff options
context:
space:
mode:
authorJoshua Clayton <stillcompiling@gmail.com>2016-01-04 10:31:23 -0800
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2016-03-14 17:08:04 +0100
commitf07fa9242ee72e8a1e926458759b895b3f1de115 (patch)
treed976c0fc11a8275c9039962c4c648cbb69f1a66d /Documentation/devicetree/bindings/rtc
parent1e094b946c1e2186b412118c2af3cc602cad3ac4 (diff)
rtc: pcf2123: avoid resetting the clock if possible
pcf2123 data sheet recommends a software reset when the chip is first powered on. This change avoids resetting the chip every time the driver is loaded, which has some negative effects. There are several registers including a clock rate adjustment that really should survive a reload of the driver (or reboot). In addition, stopping and restarting the clock to verify the chip is there is not a good thing once the time is set. According to the data sheet, the seconds register has a 1 in the high bit when the voltage has gotten low. We check for this condition, as well as whether the time retrieved from the chip is valid. We reset the rtc only if the time is not reliable and valid. This is sufficient for checking for the presence of the chip, as either all zeros or all 0xff will result in an invalid time/date Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'Documentation/devicetree/bindings/rtc')
0 files changed, 0 insertions, 0 deletions