]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
rtc: st-lpc: add range
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 21 May 2018 20:49:05 +0000 (22:49 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 23 May 2018 07:26:19 +0000 (09:26 +0200)
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>
drivers/rtc/rtc-st-lpc.c

index 2f1ef2c2874084322360191579c5b8e2eeb38cfc..bee75ca7ff79b10872b690affc6a9d388aa25844 100644 (file)
@@ -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) {