summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2018-05-21 22:49:05 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-05-23 09:26:19 +0200
commitb64c984ac8c0806e8fee608d4e1d33d2e7f6fb0f (patch)
tree46da49d4c683a3c83ac910733b02290894812f8c /drivers/rtc
parentd482510fee9957ffaca3a0357c655628f3e3870b (diff)
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>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-st-lpc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-st-lpc.c b/drivers/rtc/rtc-st-lpc.c
index 2f1ef2c28740..bee75ca7ff79 100644
--- a/drivers/rtc/rtc-st-lpc.c
+++ b/drivers/rtc/rtc-st-lpc.c
@@ -258,6 +258,8 @@ static int st_rtc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, rtc);
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);
if (ret) {