From: Alexandre Belloni Date: Fri, 6 Mar 2020 07:35:46 +0000 (+0100) Subject: rtc: da9052: set range X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=23af616ca4da8af1ee92362d20abbb5e87b9ed88;p=linux.git rtc: da9052: set range The da9052 is an rtc valid from 2000 to 2063 (max year is 63). Acked-by: Adam Thomson Link: https://lore.kernel.org/r/20200306073548.57579-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni --- diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c index e76561b8ad4cf..39b909d24cc66 100644 --- a/drivers/rtc/rtc-da9052.c +++ b/drivers/rtc/rtc-da9052.c @@ -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)