浏览代码

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 <alexandre.belloni@bootlin.com>
Alexandre Belloni 7 年之前
父节点
当前提交
30d7891ae9
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/rtc/rtc-vr41xx.c

+ 2 - 0
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);