summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-ds1343.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2019-10-19 23:49:33 +0300
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-10-19 23:55:56 +0300
commit21783322fe4abad282cb80ae8d59ca9ef6c0e7fd (patch)
tree38743d13b50162f489be853f3c38a617bf0d32c2 /drivers/rtc/rtc-ds1343.c
parentae4866884338259318be94fa8f88015cced07000 (diff)
downloadlinux-21783322fe4abad282cb80ae8d59ca9ef6c0e7fd.tar.xz
rtc: ds1343: set range
This is a standard BCD rtc with a useless century bit (no leap year correction after 2099). Link: https://lore.kernel.org/r/20191019204941.6203-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-ds1343.c')
-rw-r--r--drivers/rtc/rtc-ds1343.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-ds1343.c b/drivers/rtc/rtc-ds1343.c
index fa6de31d5793..b45d1b8fd631 100644
--- a/drivers/rtc/rtc-ds1343.c
+++ b/drivers/rtc/rtc-ds1343.c
@@ -520,6 +520,8 @@ static int ds1343_probe(struct spi_device *spi)
priv->rtc->nvram_old_abi = true;
priv->rtc->ops = &ds1343_rtc_ops;
+ priv->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
+ priv->rtc->range_max = RTC_TIMESTAMP_END_2099;
res = rtc_register_device(priv->rtc);
if (res)