]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: pcf8523: add support for trimming the RTC oscillator
authorRussell King <rmk+kernel@armlinux.org.uk>
Fri, 29 Sep 2017 10:23:36 +0000 (11:23 +0100)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Wed, 25 Oct 2017 21:05:52 +0000 (23:05 +0200)
commit7be34f139f05018e121052d00d01bc57914ae03a
tree73b8634bb8056d545ef1df0f5277fba0424edcba
parent46ec580db1ddd6e51312a031a7e3f58d2f34d497
rtc: pcf8523: add support for trimming the RTC oscillator

Add support for reading and writing the RTC offset register, converting
it to the corresponding parts-per-billion value.

When setting the drift, the PCF8523 has two modes: one applies the
adjustment every two hours, the other applies the adjustment every
minute.  We select between these two modes according to which ever
gives the closest PPB value to the one requested.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-pcf8523.c