rtc: pcf85363: set range
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 10 Apr 2019 20:56:01 +0000 (22:56 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 11 Apr 2019 14:42:55 +0000 (16:42 +0200)
This is a standard BCD RTC that will fail in 2100.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-pcf85363.c

index 3905c0ad9d83609bb23c678d8ddbc06a5b9c7cf5..8d538a253d7275310ea87ae886016df61e953d61 100644 (file)
@@ -406,6 +406,8 @@ static int pcf85363_probe(struct i2c_client *client,
                return PTR_ERR(pcf85363->rtc);
 
        pcf85363->rtc->ops = &rtc_ops;
+       pcf85363->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
+       pcf85363->rtc->range_max = RTC_TIMESTAMP_END_2099;
 
        if (client->irq > 0) {
                regmap_write(pcf85363->regmap, CTRL_FLAGS, 0);