diff mbox series

[2/2] rtc: vr41xx: add range

Message ID 20180517204706.28192-2-alexandre.belloni@bootlin.com
State Accepted
Headers show
Series [1/2] rtc: vr41xx: fix possible race condition | expand

Commit Message

Alexandre Belloni May 17, 2018, 8:47 p.m. UTC
The vr41xx RTC is a 48-bit counter counting at 32.768 kHz, giving a maximum
value of 2^(48-15)-1 seconds.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-vr41xx.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c
index 2f1212a25f7e..70f013e692b0 100644
--- a/drivers/rtc/rtc-vr41xx.c
+++ b/drivers/rtc/rtc-vr41xx.c
@@ -300,6 +300,8 @@  static int rtc_probe(struct platform_device *pdev)
 
 	rtc->ops = &vr41xx_rtc_ops;
 
+	/* 48-bit counter at 32.768 kHz */
+	rtc->range_max = (1ULL << 33) - 1;
 	rtc->max_user_freq = MAX_PERIODIC_RATE;
 
 	spin_lock_irq(&rtc_lock);