提交 c36b52ed 编写于 作者: A Alexandre Belloni

rtc: ds1685: Add range

Useful range is 2000-2099 because leap year fails on centuries.
Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
上级 a2ae8323
...@@ -2043,6 +2043,10 @@ ds1685_rtc_probe(struct platform_device *pdev) ...@@ -2043,6 +2043,10 @@ ds1685_rtc_probe(struct platform_device *pdev)
rtc_dev->ops = &ds1685_rtc_ops; rtc_dev->ops = &ds1685_rtc_ops;
/* Century bit is useless because leap year fails in 1900 and 2100 */
rtc_dev->range_min = RTC_TIMESTAMP_BEGIN_2000;
rtc_dev->range_max = RTC_TIMESTAMP_END_2099;
/* Maximum periodic rate is 8192Hz (0.122070ms). */ /* Maximum periodic rate is 8192Hz (0.122070ms). */
rtc_dev->max_user_freq = RTC_MAX_USER_FREQ; rtc_dev->max_user_freq = RTC_MAX_USER_FREQ;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册