aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-rv8803.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-03-08 09:54:55 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-08 09:54:55 -0800
commitf8d35403ebf5a6cce6a2347015f465a4da470f7b (patch)
tree6fd0b4dd87df0ef933febac578c25cac438be15d /drivers/rtc/rtc-rv8803.c
parentMerge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal (diff)
parentrtc: pic32: convert to SPDX identifier (diff)
downloadlinux-dev-f8d35403ebf5a6cce6a2347015f465a4da470f7b.tar.xz
linux-dev-f8d35403ebf5a6cce6a2347015f465a4da470f7b.zip
Merge tag 'rtc-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC updates from Alexandre Belloni: "There is an unusual amount of new drivers this cycle, and this explains the number of insertions. Other than that, the changes are the usual fixes and feature addition. Subsystem updates: - new quartz-load-femtofarads DT property for quartz load capacitance - remove rtc_class_ops.read_callback New drivers: - Abracon AB-RTCMC-32.768kHz-EOZ9 - Amlogic Meson RTC - Cadence RTC IP - Microcrystal RV3028 - Whwave sd3078 Driver updates: - cmos: ignore bogus century byte - ds1307: rework rx8130 support - isl1208: add isl1209 support, nvmem support - rs5C372: report invalid time when the oscillator stopped - rx8581: add rx8571 support" * tag 'rtc-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (66 commits) rtc: pic32: convert to SPDX identifier rtc: pic32: let the core handle range rtc: pic32: convert to devm_rtc_allocate_device rtc: update my email address rtc: rv8803: convert to SPDX identifier rtc: rv8803: let the core handle range rtc: tx4939: convert to SPDX identifier rtc: tx4939: use .set_time rtc: tx4939: switch to rtc_time64_to_tm/rtc_tm_to_time64 rtc: tx4939: set range rtc: tx4939: remove useless test rtc: zynqmp: let the core handle range rtc: zynqmp: fix possible race condition rtc: imx-sc: use rtc_time64_to_tm rtc: rx8581: Add support for Epson rx8571 RTC dt-bindings: rtc: add rx8571 compatible rtc: pcf85063: remove dead code rtc: remove rtc_class_ops.read_callback rtc: add AB-RTCMC-32.768kHz-EOZ9 RTC support dt-bindings: rtc: add ABEOZ9 ...
Diffstat (limited to 'drivers/rtc/rtc-rv8803.c')
-rw-r--r--drivers/rtc/rtc-rv8803.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv8803.c
index 450a0b831a2d..0b102c3cf5a4 100644
--- a/drivers/rtc/rtc-rv8803.c
+++ b/drivers/rtc/rtc-rv8803.c
@@ -1,13 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* RTC driver for the Micro Crystal RV8803
*
* Copyright (C) 2015 Micro Crystal SA
- *
- * Alexandre Belloni <alexandre.belloni@free-electrons.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
+ * Alexandre Belloni <alexandre.belloni@bootlin.com>
*
*/
@@ -236,9 +232,6 @@ static int rv8803_set_time(struct device *dev, struct rtc_time *tm)
u8 date[7];
int ctrl, flags, ret;
- if ((tm->tm_year < 100) || (tm->tm_year > 199))
- return -EINVAL;
-
ctrl = rv8803_read_reg(rv8803->client, RV8803_CTRL);
if (ctrl < 0)
return ctrl;
@@ -602,6 +595,8 @@ static int rv8803_probe(struct i2c_client *client,
rv8803->rtc->ops = &rv8803_rtc_ops;
rv8803->rtc->nvram_old_abi = true;
+ rv8803->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
+ rv8803->rtc->range_max = RTC_TIMESTAMP_END_2099;
err = rtc_register_device(rv8803->rtc);
if (err)
return err;
@@ -648,6 +643,6 @@ static struct i2c_driver rv8803_driver = {
};
module_i2c_driver(rv8803_driver);
-MODULE_AUTHOR("Alexandre Belloni <alexandre.belloni@free-electrons.com>");
+MODULE_AUTHOR("Alexandre Belloni <alexandre.belloni@bootlin.com>");
MODULE_DESCRIPTION("Micro Crystal RV8803 RTC driver");
MODULE_LICENSE("GPL v2");