linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: linux-rtc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Alexandre Belloni <alexandre.belloni@bootlin.com>
Subject: [PATCH 07/10] rtc: ds1347: set range
Date: Mon,  7 Oct 2019 15:47:21 +0200	[thread overview]
Message-ID: <20191007134724.15505-7-alexandre.belloni@bootlin.com> (raw)
In-Reply-To: <20191007134724.15505-1-alexandre.belloni@bootlin.com>

The DS1347 handle dates from year 0000 to 9999. Leap years are claimed to
be handled correctly in the datasheet.

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

diff --git a/drivers/rtc/rtc-ds1347.c b/drivers/rtc/rtc-ds1347.c
index 75c522c8ab26..22a75b01f1ac 100644
--- a/drivers/rtc/rtc-ds1347.c
+++ b/drivers/rtc/rtc-ds1347.c
@@ -134,6 +134,8 @@ static int ds1347_probe(struct spi_device *spi)
 		return PTR_ERR(rtc);
 
 	rtc->ops = &ds1347_rtc_ops;
+	rtc->range_min = RTC_TIMESTAMP_BEGIN_0000;
+	rtc->range_max = RTC_TIMESTAMP_END_9999;
 
 	return rtc_register_device(rtc);
 }
-- 
2.21.0


  parent reply	other threads:[~2019-10-07 13:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-07 13:47 [PATCH 01/10] rtc: add a timestamp for year 0 Alexandre Belloni
2019-10-07 13:47 ` [PATCH 02/10] rtc: ds1347: remove verbose messages Alexandre Belloni
2019-10-07 13:47 ` [PATCH 03/10] rtc: ds1347: remove useless read Alexandre Belloni
2019-10-07 13:47 ` [PATCH 04/10] rtc: ds1347: simplify getting .driver_data Alexandre Belloni
2019-10-07 13:47 ` [PATCH 05/10] rtc: ds1347: mask ALM OUT when reading time Alexandre Belloni
2019-10-07 13:47 ` [PATCH 06/10] rtc: ds1347: convert to devm_rtc_allocate_device Alexandre Belloni
2019-10-07 13:47 ` Alexandre Belloni [this message]
2019-10-07 13:47 ` [PATCH 08/10] rtc: ds1347: properly handle oscillator failures Alexandre Belloni
2019-10-07 13:47 ` [PATCH 09/10] rtc: ds1347: use regmap_update_bits Alexandre Belloni
2019-10-07 13:47 ` [PATCH 10/10] rtc: ds1347: handle century register 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=20191007134724.15505-7-alexandre.belloni@bootlin.com \
    --to=alexandre.belloni@bootlin.com \
    --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;
as well as URLs for NNTP newsgroup(s).