linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Support Opensource <support.opensource@diasemi.com>,
	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: da9052: set range
Date: Fri,  6 Mar 2020 08:35:46 +0100	[thread overview]
Message-ID: <20200306073548.57579-2-alexandre.belloni@bootlin.com> (raw)
In-Reply-To: <20200306073548.57579-1-alexandre.belloni@bootlin.com>

The da9052 is an rtc valid from 2000 to 2063 (max year is 63).

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-da9052.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c
index e159c5911122..27cde834a1b8 100644
--- a/drivers/rtc/rtc-da9052.c
+++ b/drivers/rtc/rtc-da9052.c
@@ -303,6 +303,8 @@ static int da9052_rtc_probe(struct platform_device *pdev)
 		return PTR_ERR(rtc->rtc);
 
 	rtc->rtc->ops = &da9052_rtc_ops;
+	rtc->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
+	rtc->rtc->range_max = RTC_TIMESTAMP_END_2063;
 
 	ret = da9052_request_irq(rtc->da9052, DA9052_IRQ_ALARM, "ALM",
 				da9052_rtc_irq, rtc);
-- 
2.24.1


  reply	other threads:[~2020-03-06  7:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06  7:35 [PATCH 1/3] rtc: da9052: convert to devm_rtc_allocate_device Alexandre Belloni
2020-03-06  7:35 ` Alexandre Belloni [this message]
2020-03-12 17:16   ` [PATCH 2/3] rtc: da9052: set range Adam Thomson
2020-03-06  7:35 ` [PATCH 3/3] rtc: da9052: switch to rtc_time64_to_tm/rtc_tm_to_time64 Alexandre Belloni
2020-03-12 17:26   ` Adam Thomson
2020-03-12 17:11 ` [PATCH 1/3] rtc: da9052: convert to devm_rtc_allocate_device Adam Thomson

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=20200306073548.57579-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 \
    --cc=support.opensource@diasemi.com \
    /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;
as well as URLs for NNTP newsgroup(s).