]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
rtc: snvs: set range
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 28 Aug 2019 20:50:55 +0000 (22:50 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sun, 1 Sep 2019 06:48:15 +0000 (08:48 +0200)
The SNVS is a 47-bit counter incremented at 32768Hz, it is then a 32-bit
second counter.

Link: https://lore.kernel.org/r/20190828205056.31321-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-snvs.c

index 4f9a107a04277fe2ce926be590b02141e93c0385..50dd4b8492ebafb7446287e0a1fe8930a107e547 100644 (file)
@@ -348,6 +348,7 @@ static int snvs_rtc_probe(struct platform_device *pdev)
        }
 
        data->rtc->ops = &snvs_rtc_ops;
+       data->rtc->range_max = U32_MAX;
        ret = rtc_register_device(data->rtc);
        if (ret) {
                dev_err(&pdev->dev, "failed to register rtc: %d\n", ret);