summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2019-10-07 15:47:21 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-10-07 15:49:33 +0200
commit3ce20a23e2199bd98eb85fbaa524104931cd14dd (patch)
tree2e9b6028fb1502718925c1d46e3370b2d2ec2295
parent554692d56d74cd2e1de369570c242eb22c203c6d (diff)
rtc: ds1347: set range
The DS1347 handle dates from year 0000 to 9999. Leap years are claimed to be handled correctly in the datasheet. Link: https://lore.kernel.org/r/20191007134724.15505-7-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r--drivers/rtc/rtc-ds1347.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-ds1347.c b/drivers/rtc/rtc-ds1347.c
index 75c522c8ab26..22a75b01f1ac 100644
--- a/drivers/rtc/rtc-ds1347.c
+++ b/drivers/rtc/rtc-ds1347.c
@@ -134,6 +134,8 @@ static int ds1347_probe(struct spi_device *spi)
return PTR_ERR(rtc);
rtc->ops = &ds1347_rtc_ops;
+ rtc->range_min = RTC_TIMESTAMP_BEGIN_0000;
+ rtc->range_max = RTC_TIMESTAMP_END_9999;
return rtc_register_device(rtc);
}