From: Alexandre Belloni Date: Thu, 17 May 2018 20:47:06 +0000 (+0200) Subject: rtc: vr41xx: add range X-Git-Tag: v4.18-rc1~64^2~42 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=30d7891ae903d1e2903033a3df453d7533011076;p=linux.git rtc: vr41xx: add range 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 --- 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);