From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] rtc: cpcap: set range
Date: Fri, 6 Mar 2020 02:57:02 +0100 [thread overview]
Message-ID: <20200306015703.42101-2-alexandre.belloni@bootlin.com> (raw)
In-Reply-To: <20200306015703.42101-1-alexandre.belloni@bootlin.com>
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.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
drivers/rtc/rtc-cpcap.c | 1 +
1 file changed, 1 insertion(+)
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)
--
2.24.1
next prev parent reply other threads:[~2020-03-06 1:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-06 1:57 [PATCH 1/3] rtc: cpcap: convert to devm_rtc_allocate_device Alexandre Belloni
2020-03-06 1:57 ` Alexandre Belloni [this message]
2020-03-06 1:57 ` [PATCH 3/3] rtc: cpcap: switch to rtc_time64_to_tm/rtc_tm_to_time64 Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200306015703.42101-2-alexandre.belloni@bootlin.com \
--to=alexandre.belloni@bootlin.com \
--cc=a.zummo@towertech.it \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox