浏览代码

rtc: st-lpc: add range

The RTC has a 64 bit counter.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Alexandre Belloni 7 年之前
父节点
当前提交
b64c984ac8
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/rtc/rtc-st-lpc.c

+ 2 - 0
drivers/rtc/rtc-st-lpc.c

@@ -258,6 +258,8 @@ static int st_rtc_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, rtc);
 	platform_set_drvdata(pdev, rtc);
 
 
 	rtc->rtc_dev->ops = &st_rtc_ops;
 	rtc->rtc_dev->ops = &st_rtc_ops;
+	rtc->rtc_dev->range_max = U64_MAX;
+	do_div(rtc->rtc_dev->range_max, rtc->clkrate);
 
 
 	ret = rtc_register_device(rtc->rtc_dev);
 	ret = rtc_register_device(rtc->rtc_dev);
 	if (ret) {
 	if (ret) {