]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
rtc: vr41xx: add range
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 17 May 2018 20:47:06 +0000 (22:47 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 17 May 2018 20:54:21 +0000 (22:54 +0200)
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

index 2f1212a25f7e9b0ab3d64dc65db669035d137767..70f013e692b0aac45d69923b182a319bb3a9e29c 100644 (file)
@@ -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);