Commit 3ce20a23 authored by Alexandre Belloni's avatar Alexandre Belloni

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.comSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 554692d5
...@@ -134,6 +134,8 @@ static int ds1347_probe(struct spi_device *spi) ...@@ -134,6 +134,8 @@ static int ds1347_probe(struct spi_device *spi)
return PTR_ERR(rtc); return PTR_ERR(rtc);
rtc->ops = &ds1347_rtc_ops; rtc->ops = &ds1347_rtc_ops;
rtc->range_min = RTC_TIMESTAMP_BEGIN_0000;
rtc->range_max = RTC_TIMESTAMP_END_9999;
return rtc_register_device(rtc); return rtc_register_device(rtc);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment