rtc: da9052: set range
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 6 Mar 2020 07:35:46 +0000 (08:35 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 1 Apr 2020 10:33:43 +0000 (12:33 +0200)
The da9052 is an rtc valid from 2000 to 2063 (max year is 63).

Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Link: https://lore.kernel.org/r/20200306073548.57579-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-da9052.c

index e76561b8ad4cf661073a9628e077608cd9980139..39b909d24cc66d2b9052f4a83de88ce23d4cf76a 100644 (file)
@@ -303,6 +303,8 @@ static int da9052_rtc_probe(struct platform_device *pdev)
                return PTR_ERR(rtc->rtc);
 
        rtc->rtc->ops = &da9052_rtc_ops;
+       rtc->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
+       rtc->rtc->range_max = RTC_TIMESTAMP_END_2063;
 
        ret = rtc_register_device(rtc->rtc);
        if (ret)