summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-cpcap.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2020-03-06 02:57:02 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2020-03-16 11:12:10 +0100
commitd2377f8cc5a7add7ba78db8122cf33e83c47d525 (patch)
tree077f78975585043ff2e8ef693ad8a87e09e8f091 /drivers/rtc/rtc-cpcap.c
parent05b38d182c5deeadb1b7eeb3e35c35b7652dc0e8 (diff)
rtc: cpcap: set range
The CPCAP rtc is a 14bit day counter plus a 17bit seconds counter. Note that this failed on Nov 10 2014 so it is very likely this driver as never been used since. Link: https://lore.kernel.org/r/20200306015703.42101-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-cpcap.c')
-rw-r--r--drivers/rtc/rtc-cpcap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-cpcap.c b/drivers/rtc/rtc-cpcap.c
index 35f0717661b3..38f949730b1b 100644
--- a/drivers/rtc/rtc-cpcap.c
+++ b/drivers/rtc/rtc-cpcap.c
@@ -261,6 +261,7 @@ static int cpcap_rtc_probe(struct platform_device *pdev)
return PTR_ERR(rtc->rtc_dev);
rtc->rtc_dev->ops = &cpcap_rtc_ops;
+ rtc->rtc_dev->range_max = (1 << 14) * SECS_PER_DAY - 1;
err = cpcap_get_vendor(dev, rtc->regmap, &rtc->vendor);
if (err)