From: Alexandre Belloni Date: Mon, 21 May 2018 20:49:05 +0000 (+0200) Subject: rtc: st-lpc: add range X-Git-Tag: v4.18-rc1~64^2~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b64c984ac8c0806e8fee608d4e1d33d2e7f6fb0f;p=thirdparty%2Fkernel%2Flinux.git rtc: st-lpc: add range The RTC has a 64 bit counter. Signed-off-by: Alexandre Belloni Acked-by: Patrice Chotard Signed-off-by: Alexandre Belloni --- diff --git a/drivers/rtc/rtc-st-lpc.c b/drivers/rtc/rtc-st-lpc.c index 2f1ef2c287408..bee75ca7ff79b 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) {