aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ds1305.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2020-03-06 08:34:58 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2020-03-16 11:12:10 +0100
commit9869a93c823bc7fe2fba7407ea25f400c8f98e61 (patch)
tree59efff6ea3433ae0481f26a07c300c3e5eeb2d38 /drivers/rtc/rtc-ds1305.c
parentrtc: ds1374: switch to rtc_time64_to_tm/rtc_tm_to_time64 (diff)
downloadlinux-dev-9869a93c823bc7fe2fba7407ea25f400c8f98e61.tar.xz
linux-dev-9869a93c823bc7fe2fba7407ea25f400c8f98e61.zip
rtc: ds1305: set range
The ds1305 is a BCD rtc valid from 2000 to 2099. Link: https://lore.kernel.org/r/20200306073459.57197-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-ds1305.c')
-rw-r--r--drivers/rtc/rtc-ds1305.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c
index 4420fbf2f8fe..ca55ebab24fb 100644
--- a/drivers/rtc/rtc-ds1305.c
+++ b/drivers/rtc/rtc-ds1305.c
@@ -694,6 +694,8 @@ static int ds1305_probe(struct spi_device *spi)
return PTR_ERR(ds1305->rtc);
ds1305->rtc->ops = &ds1305_ops;
+ ds1305->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
+ ds1305->rtc->range_max = RTC_TIMESTAMP_END_2099;
ds1305_nvmem_cfg.priv = ds1305;
ds1305->rtc->nvram_old_abi = true;