diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-05-21 16:49:05 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-05-23 03:26:19 -0400 |
commit | b64c984ac8c0806e8fee608d4e1d33d2e7f6fb0f (patch) | |
tree | 46da49d4c683a3c83ac910733b02290894812f8c | |
parent | d482510fee9957ffaca3a0357c655628f3e3870b (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>
-rw-r--r-- | drivers/rtc/rtc-st-lpc.c | 2 |
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) | |||
258 | platform_set_drvdata(pdev, rtc); | 258 | platform_set_drvdata(pdev, rtc); |
259 | 259 | ||
260 | rtc->rtc_dev->ops = &st_rtc_ops; | 260 | rtc->rtc_dev->ops = &st_rtc_ops; |
261 | rtc->rtc_dev->range_max = U64_MAX; | ||
262 | do_div(rtc->rtc_dev->range_max, rtc->clkrate); | ||
261 | 263 | ||
262 | ret = rtc_register_device(rtc->rtc_dev); | 264 | ret = rtc_register_device(rtc->rtc_dev); |
263 | if (ret) { | 265 | if (ret) { |