提交 8a25c8f6 编写于 作者: R Russell King 提交者: Alexandre Belloni

rtc: clarify the RTC offset correction

The RTC offset correction documentation is not very clear about the
exact relationship between "offset" and the effect it has on the RTC.
Supplement the documentation with an equation giving the relationship.
Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
上级 9d7ed21f
...@@ -1004,6 +1004,10 @@ int rtc_read_offset(struct rtc_device *rtc, long *offset) ...@@ -1004,6 +1004,10 @@ int rtc_read_offset(struct rtc_device *rtc, long *offset)
* to compensate for differences in the actual clock rate due to temperature, * to compensate for differences in the actual clock rate due to temperature,
* the crystal, capacitor, etc. * the crystal, capacitor, etc.
* *
* The adjustment applied is as follows:
* t = t0 * (1 + offset * 1e-9)
* where t0 is the measured length of 1 RTC second with offset = 0
*
* Kernel interface to adjust an rtc clock offset. * Kernel interface to adjust an rtc clock offset.
* Return 0 on success, or a negative number on error. * Return 0 on success, or a negative number on error.
* If the rtc offset is not setable (or not implemented), return -EINVAL * If the rtc offset is not setable (or not implemented), return -EINVAL
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册