rtc: at91rm9200: add range
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 17 May 2018 20:17:28 +0000 (22:17 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 17 May 2018 20:23:14 +0000 (22:23 +0200)
The at91rm9200 RTC can support dates from 1900-01-01 00:00:00 to 2099-12-31
23:59:59.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-at91rm9200.c

index de81ece..caa71d0 100644 (file)
@@ -440,6 +440,8 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
                device_init_wakeup(&pdev->dev, 1);
 
        rtc->ops = &at91_rtc_ops;
+       rtc->range_min = RTC_TIMESTAMP_BEGIN_1900;
+       rtc->range_max = RTC_TIMESTAMP_END_2099;
        ret = rtc_register_device(rtc);
        if (ret)
                goto err_clk;