rtc: rs5c372: add offset correction support
authorCamel Guo <camelg@axis.com>
Thu, 2 Dec 2021 15:22:52 +0000 (16:22 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 4 Jan 2022 22:27:34 +0000 (23:27 +0100)
commitdd93849d47ce1517c1383ef30bd7497a001d213f
treeffc28f43eb62802a5feff375ce60d524fba8d7a9
parentcd17420ebea580c22dd3a93f7237de3d2cfafc37
rtc: rs5c372: add offset correction support

In order for linux userspace application to be able to adjust offset to
keep rtc precision as high as possible, this commit adds support of
offset correction by adjusting the time trimming register on
rs5c372[a|b] and oscilluation adjustment register on r2025x, r222[1|3]x,
rv5c38[6|7]a.

Signed-off-by: Camel Guo <camelg@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20211202152252.31264-1-camel.guo@axis.com
drivers/rtc/rtc-rs5c372.c