LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2] rtc: st-lpc: add range
@ 2018-05-21 20:49 Alexandre Belloni
2018-05-23 7:24 ` Patrice CHOTARD
0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Belloni @ 2018-05-21 20:49 UTC (permalink / raw)
To: linux-rtc
Cc: linux-kernel, Patrice Chotard, linux-arm-kernel, Alexandre Belloni
The RTC has a 64 bit counter.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
drivers/rtc/rtc-st-lpc.c | 2 ++
1 file changed, 2 insertions(+)
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) {
--
2.17.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] rtc: st-lpc: add range
2018-05-21 20:49 [PATCH v2] rtc: st-lpc: add range Alexandre Belloni
@ 2018-05-23 7:24 ` Patrice CHOTARD
0 siblings, 0 replies; 2+ messages in thread
From: Patrice CHOTARD @ 2018-05-23 7:24 UTC (permalink / raw)
To: Alexandre Belloni, linux-rtc; +Cc: linux-kernel, linux-arm-kernel
Hi Alexandre
On 05/21/2018 10:49 PM, Alexandre Belloni wrote:
> The RTC has a 64 bit counter.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---
> drivers/rtc/rtc-st-lpc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> 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) {
>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Patrice
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-23 7:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-21 20:49 [PATCH v2] rtc: st-lpc: add range Alexandre Belloni
2018-05-23 7:24 ` Patrice CHOTARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).