projects/linux·commit da7ca04e

Merge tag 'rtc-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux

da7ca04e · Linus Torvalds <[email protected]> · 2026-06-27 11:00:18 -07:00

Pull RTC updates from Alexandre Belloni:
 "Most of the work and improvements are for features of the m41t93.

  The ds1307 also gets support for OSF (Oscillator Stop Flag) for
  new variants.

  The pcap driver is being removed as the Motorola EZX support was
  removed a while ago.

  Subsystem:
   - add rtc_read_next_alarm() to read next expiring timer

  Drivers:
   - ds1307: handle OSF for ds1337/ds1339/ds3231, add clock provider for
     ds1307, fix wday for rx8130
   - m41t93: DT support, alarm, clock provider, watchdog support
   - mv: add suspend/resume support for wakeup
   - pcap: remove driver
   - renesas-rtca3: many fixes"

* tag 'rtc-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (36 commits)
  rtc: ds1307: update reference to removed CONFIG_RTC_DRV_DS1307_HWMON
  platform/x86: amd-pmc: Fix S0i3 wakeup with alarmtimer
  rtc: s35390a: fix typo in comment
  rtc: cmos: unregister HPET IRQ handler on probe failure
  rtc: ds1307: Fix off-by-one issue with wday for rx8130
  dt-bindings: rtc: ds1307: Add epson,rx8901
  rtc: bq32000: add delay between RTC reads
  rtc: m41t93: Add watchdog support
  rtc: m41t93: Add square wave clock provider support
  rtc: m41t93: Add alarm support
  rtc: m41t93: migrate to regmap api for register access
  rtc: m41t93: add device tree support
  dt-bindings: rtc: Add ST m41t93
  rtc: ds1307: add support for clock provider in ds1307
  rtc: mv: add suspend/resume support for wakeup
  rtc: aspeed: add AST2700 compatible
  dt-bindings: rtc: add ASPEED AST2700 compatible
  rtc: interface: fix typos in rtc_handle_legacy_irq() documentation
  rtc: msc313: fix NULL deref in shared IRQ handler at probe
  rtc: remove unused pcap driver
  ...
Commit
da7ca04e331e3e83f661e29c30d381a91e6ca245
Parents
6ca693ea · 3c8f2857

Merge commit. Changes below are compared with the first parent: 6ca693ea.

Changes

61 files changed · +961 −441

FileStatusAddDelContent
Documentation/devicetree/bindings/rtc/epson,rx6110.txtdeleted+0−39View before deletion
Documentation/devicetree/bindings/rtc/epson,rx6110.yamladded+68−0View file
Documentation/devicetree/bindings/rtc/rtc-ds1307.yamlmodified+1−0View file
Documentation/devicetree/bindings/rtc/st,m41t93.yamladded+50−0View file
Documentation/devicetree/bindings/rtc/trivial-rtc.yamlmodified+2−0View file
drivers/platform/x86/amd/pmc/pmc.cmodified+6−3View file
drivers/rtc/Kconfigmodified+0−7View file
drivers/rtc/Makefilemodified+0−1View file
drivers/rtc/interface.cmodified+42−2View file
drivers/rtc/rtc-88pm886.cmodified+1−1View file
drivers/rtc/rtc-ab-b5ze-s3.cmodified+1−1View file
drivers/rtc/rtc-ab-eoz9.cmodified+1−1View file
drivers/rtc/rtc-ab8500.cmodified+3−5View file
drivers/rtc/rtc-abx80x.cmodified+12−11View file
drivers/rtc/rtc-aspeed.cmodified+1−0View file
drivers/rtc/rtc-bd70528.cmodified+4−4View file
drivers/rtc/rtc-bq32k.cmodified+10−1View file
drivers/rtc/rtc-cmos.cmodified+6−0View file
drivers/rtc/rtc-cros-ec.cmodified+2−2View file
drivers/rtc/rtc-ds1307.cmodified+174−33View file
drivers/rtc/rtc-ds1374.cmodified+1−1View file
drivers/rtc/rtc-ds1672.cmodified+1−1View file
drivers/rtc/rtc-ds3232.cmodified+1−1View file
drivers/rtc/rtc-em3027.cmodified+1−1View file
drivers/rtc/rtc-fm3130.cmodified+1−1View file
drivers/rtc/rtc-hym8563.cmodified+2−2View file
drivers/rtc/rtc-isl12022.cmodified+1−1View file
drivers/rtc/rtc-isl12026.cmodified+2−2View file
drivers/rtc/rtc-isl1208.cmodified+19−6View file
drivers/rtc/rtc-m41t80.cmodified+11−11View file
drivers/rtc/rtc-m41t93.cmodified+436−52View file
drivers/rtc/rtc-max31335.cmodified+2−2View file
drivers/rtc/rtc-max6900.cmodified+1−1View file
drivers/rtc/rtc-max77686.cmodified+5−5View file
drivers/rtc/rtc-max8997.cmodified+2−2View file
drivers/rtc/rtc-max8998.cmodified+2−2View file
drivers/rtc/rtc-mpfs.cmodified+1−1View file
drivers/rtc/rtc-msc313.cmodified+2−2View file
drivers/rtc/rtc-mv.cmodified+23−0View file
drivers/rtc/rtc-nct3018y.cmodified+1−1View file
drivers/rtc/rtc-pcap.cdeleted+0−179View before deletion
drivers/rtc/rtc-pcf2127.cmodified+4−4View file
drivers/rtc/rtc-pcf85063.cmodified+6−6View file
drivers/rtc/rtc-pcf8523.cmodified+1−1View file
drivers/rtc/rtc-pcf8563.cmodified+3−3View file
drivers/rtc/rtc-pcf8583.cmodified+1−1View file
drivers/rtc/rtc-renesas-rtca3.cmodified+15−11View file
drivers/rtc/rtc-rs5c372.cmodified+6−6View file
drivers/rtc/rtc-rv3029c2.cmodified+2−2View file
drivers/rtc/rtc-rv8803.cmodified+4−4View file
drivers/rtc/rtc-rx6110.cmodified+1−1View file
drivers/rtc/rtc-rx8010.cmodified+1−1View file
drivers/rtc/rtc-rx8025.cmodified+2−2View file
drivers/rtc/rtc-rx8581.cmodified+1−1View file
drivers/rtc/rtc-s35390a.cmodified+2−2View file
drivers/rtc/rtc-s5m.cmodified+6−6View file
drivers/rtc/rtc-sd2405al.cmodified+1−1View file
drivers/rtc/rtc-sd3078.cmodified+1−1View file
drivers/rtc/rtc-tps6594.cmodified+2−2View file
drivers/rtc/rtc-x1205.cmodified+1−1View file
include/linux/rtc.hmodified+2−0View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/devicetree/bindings/rtc/epson,rx6110.txt

View before deletion
diff --git a/Documentation/devicetree/bindings/rtc/epson,rx6110.txt b/Documentation/devicetree/bindings/rtc/epson,rx6110.txt
deleted file mode 100644
index 3dc313e..0000000
--- a/Documentation/devicetree/bindings/rtc/epson,rx6110.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-Epson RX6110 Real Time Clock
-============================
-
-The Epson RX6110 can be used with SPI or I2C busses. The kind of
-bus depends on the SPISEL pin and can not be configured via software.
-
-I2C mode
---------
-
-Required properties:
- - compatible: should be: "epson,rx6110"
- - reg : the I2C address of the device for I2C
-
-Example:
-
- rtc: rtc@32 {
- compatible = "epson,rx6110"
- reg = <0x32>;
- };
-
-SPI mode
---------
-
-Required properties:
- - compatible: should be: "epson,rx6110"
- - reg: chip select number
- - spi-cs-high: RX6110 needs chipselect high
- - spi-cpha: RX6110 works with SPI shifted clock phase
- - spi-cpol: RX6110 works with SPI inverse clock polarity
-
-Example:
-
- rtc: rtc@3 {
- compatible = "epson,rx6110"
- reg = <3>
- spi-cs-high;
- spi-cpha;
- spi-cpol;
- };

Documentation/devicetree/bindings/rtc/epson,rx6110.yaml

View file
diff --git a/Documentation/devicetree/bindings/rtc/epson,rx6110.yaml b/Documentation/devicetree/bindings/rtc/epson,rx6110.yaml
new file mode 100644
index 0000000..55086ac
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/epson,rx6110.yaml
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/epson,rx6110.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Epson RX6110 Real Time Clock
+
+description:
+ The Epson RX6110 can be used with SPI or I2C busses. The kind of bus depends
+ on the SPISEL pin and cannot be configured via software.
+
+maintainers:
+ - Alexandre Belloni <[email protected]>
+
+allOf:
+ - $ref: rtc.yaml#
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+properties:
+ compatible:
+ const: epson,rx6110
+
+ reg:
+ maxItems: 1
+
+ spi-cs-high: true
+ spi-cpha: true
+ spi-cpol: true
+
+required:
+ - compatible
+ - reg
+
+dependencies:
+ spi-cs-high: [ spi-cpha, spi-cpol ]
+ spi-cpha: [ spi-cs-high, spi-cpol ]
+ spi-cpol: [ spi-cs-high, spi-cpha ]
+
+unevaluatedProperties: false
+
+examples:
+ # I2C mode
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@32 {
+ compatible = "epson,rx6110";
+ reg = <0x32>;
+ };
+ };
+
+ # SPI mode
+ - |
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@3 {
+ compatible = "epson,rx6110";
+ reg = <3>;
+ spi-cs-high;
+ spi-cpha;
+ spi-cpol;
+ };
+ };

Documentation/devicetree/bindings/rtc/rtc-ds1307.yaml

View file
diff --git a/Documentation/devicetree/bindings/rtc/rtc-ds1307.yaml b/Documentation/devicetree/bindings/rtc/rtc-ds1307.yaml
index 98d10e6..9b27968 100644
--- a/Documentation/devicetree/bindings/rtc/rtc-ds1307.yaml
+++ b/Documentation/devicetree/bindings/rtc/rtc-ds1307.yaml
@@ -31,6 +31,7 @@ properties:
- epson,rx8025
- isil,isl12057
- epson,rx8130
+ - epson,rx8901
- items:
- enum:

Documentation/devicetree/bindings/rtc/st,m41t93.yaml

View file
diff --git a/Documentation/devicetree/bindings/rtc/st,m41t93.yaml b/Documentation/devicetree/bindings/rtc/st,m41t93.yaml
new file mode 100644
index 0000000..bdd995c
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/st,m41t93.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/st,m41t93.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ST M41T93 RTC and compatible
+
+maintainers:
+ - Akhilesh Patil <[email protected]>
+
+description:
+ ST M41T93 is spi based Real Time Clock (RTC) with time, date,
+ alarm, watchdog, square wave clock output, 8 bit timer and
+ 7 bytes of user SRAM.
+
+properties:
+ compatible:
+ enum:
+ - st,m41t93
+
+ reg:
+ maxItems: 1
+
+ "#clock-cells":
+ const: 0
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - $ref: rtc.yaml
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ rtc@0 {
+ compatible = "st,m41t93";
+ reg = <0>;
+ #clock-cells = <0>;
+ spi-max-frequency = <2000000>;
+ };
+ };
+

Documentation/devicetree/bindings/rtc/trivial-rtc.yaml

View file
diff --git a/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml b/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
index 722176c..f4d0eed 100644
--- a/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
+++ b/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
@@ -30,6 +30,8 @@ properties:
- aspeed,ast2500-rtc
# ASPEED BMC ast2600 Real-time Clock
- aspeed,ast2600-rtc
+ # ASPEED BMC ast2700 Real-time Clock
+ - aspeed,ast2700-rtc
# Conexant Digicolor Real Time Clock Controller
- cnxt,cx92755-rtc
# I2C, 32-Bit Binary Counter Watchdog RTC with Trickle Charger and Reset Input/Output

drivers/platform/x86/amd/pmc/pmc.c

View file
diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c
index b2eb990..d50ea62 100644
--- a/drivers/platform/x86/amd/pmc/pmc.c
+++ b/drivers/platform/x86/amd/pmc/pmc.c
@@ -645,9 +645,12 @@ static int amd_pmc_verify_czn_rtc(struct amd_pmc_dev *pdev, u32 *arg)
rtc_device = rtc_class_open("rtc0");
if (!rtc_device)
return 0;
- rc = rtc_read_alarm(rtc_device, &alarm);
- if (rc)
- return rc;
+ rc = rtc_read_next_alarm(rtc_device, &alarm);
+ if (rc) {
+ if (rc == -ENOENT)
+ dev_dbg(pdev->dev, "no alarm pending\n");
+ return rc == -ENOENT ? 0 : rc;
+ }
if (!alarm.enabled) {
dev_dbg(pdev->dev, "alarm not enabled\n");
return 0;

drivers/rtc/Kconfig

View file
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 364afc7..01def82 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1763,13 +1763,6 @@ config RTC_DRV_STMP
This driver can also be built as a module. If so, the module
will be called rtc-stmp3xxx.
-config RTC_DRV_PCAP
- tristate "PCAP RTC"
- depends on EZX_PCAP
- help
- If you say Y here you will get support for the RTC found on
- the PCAP2 ASIC used on some Motorola phones.
-
config RTC_DRV_MC13XXX
depends on MFD_MC13XXX
tristate "Freescale MC13xxx RTC"

drivers/rtc/Makefile

View file
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 6cf7e06..0347645 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -128,7 +128,6 @@ obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o
obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o
obj-$(CONFIG_RTC_DRV_OPTEE) += rtc-optee.o
obj-$(CONFIG_RTC_DRV_PALMAS) += rtc-palmas.o
-obj-$(CONFIG_RTC_DRV_PCAP) += rtc-pcap.o
obj-$(CONFIG_RTC_DRV_PCF2123) += rtc-pcf2123.o
obj-$(CONFIG_RTC_DRV_PCF2127) += rtc-pcf2127.o
obj-$(CONFIG_RTC_DRV_PCF85063) += rtc-pcf85063.o

drivers/rtc/interface.c

View file
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 1906f48..96626f8 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -384,6 +384,46 @@ done:
return err;
}
+/**
+ * rtc_read_next_alarm - read the next expiring alarm
+ * @rtc: RTC device
+ * @alarm: storage for the alarm information
+ *
+ * Read the next expiring alarm from the RTC timerqueue. This returns
+ * the alarm that will actually fire next, which may be different from
+ * rtc_read_alarm() if multiple timers are queued (e.g., alarmtimer
+ * and wakealarm sysfs both active).
+ *
+ * Returns: 0 on success, -ENOENT if no alarm is pending, or other error.
+ */
+int rtc_read_next_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
+{
+ struct timerqueue_node *next;
+ int err;
+
+ if (!rtc || !alarm)
+ return -EINVAL;
+
+ err = mutex_lock_interruptible(&rtc->ops_lock);
+ if (err)
+ return err;
+
+ next = timerqueue_getnext(&rtc->timerqueue);
+ if (!next) {
+ err = -ENOENT;
+ goto unlock;
+ }
+
+ memset(alarm, 0, sizeof(struct rtc_wkalrm));
+ alarm->time = rtc_ktime_to_tm(next->expires);
+ alarm->enabled = 1;
+
+unlock:
+ mutex_unlock(&rtc->ops_lock);
+ return err;
+}
+EXPORT_SYMBOL_GPL(rtc_read_next_alarm);
+
int rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
{
int err;
@@ -635,8 +675,8 @@ EXPORT_SYMBOL_GPL(rtc_update_irq_enable);
/**
* rtc_handle_legacy_irq - AIE, UIE and PIE event hook
* @rtc: pointer to the rtc device
- * @num: number of occurence of the event
- * @mode: type of the event, RTC_AF, RTC_UF of RTC_PF
+ * @num: number of occurrence of the event
+ * @mode: type of the event, RTC_AF, RTC_UF or RTC_PF
*
* This function is called when an AIE, UIE or PIE mode interrupt
* has occurred (or been emulated).

drivers/rtc/rtc-88pm886.c

View file
diff --git a/drivers/rtc/rtc-88pm886.c b/drivers/rtc/rtc-88pm886.c
index 57e9b0a..13aa3ae 100644
--- a/drivers/rtc/rtc-88pm886.c
+++ b/drivers/rtc/rtc-88pm886.c
@@ -78,7 +78,7 @@ static int pm886_rtc_probe(struct platform_device *pdev)
}
static const struct platform_device_id pm886_rtc_id_table[] = {
- { "88pm886-rtc", },
+ { .name = "88pm886-rtc" },
{ }
};
MODULE_DEVICE_TABLE(platform, pm886_rtc_id_table);

drivers/rtc/rtc-ab-b5ze-s3.c

View file
diff --git a/drivers/rtc/rtc-ab-b5ze-s3.c b/drivers/rtc/rtc-ab-b5ze-s3.c
index 684f989..6439ca4 100644
--- a/drivers/rtc/rtc-ab-b5ze-s3.c
+++ b/drivers/rtc/rtc-ab-b5ze-s3.c
@@ -933,7 +933,7 @@ MODULE_DEVICE_TABLE(of, abb5zes3_dt_match);
#endif
static const struct i2c_device_id abb5zes3_id[] = {
- { "abb5zes3" },
+ { .name = "abb5zes3" },
{ }
};
MODULE_DEVICE_TABLE(i2c, abb5zes3_id);

drivers/rtc/rtc-ab-eoz9.c

View file
diff --git a/drivers/rtc/rtc-ab-eoz9.c b/drivers/rtc/rtc-ab-eoz9.c
index de002f7..b75f4f6 100644
--- a/drivers/rtc/rtc-ab-eoz9.c
+++ b/drivers/rtc/rtc-ab-eoz9.c
@@ -546,7 +546,7 @@ MODULE_DEVICE_TABLE(of, abeoz9_dt_match);
#endif
static const struct i2c_device_id abeoz9_id[] = {
- { "abeoz9" },
+ { .name = "abeoz9" },
{ }
};

drivers/rtc/rtc-ab8500.c

View file
diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c
index ed2b6b8..0978bd0 100644
--- a/drivers/rtc/rtc-ab8500.c
+++ b/drivers/rtc/rtc-ab8500.c
@@ -284,11 +284,10 @@ static ssize_t ab8500_sysfs_show_rtc_calibration(struct device *dev,
retval = ab8500_rtc_get_calibration(dev, &calibration);
if (retval < 0) {
dev_err(dev, "Failed to read RTC calibration attribute\n");
- sprintf(buf, "0\n");
return retval;
}
- return sprintf(buf, "%d\n", calibration);
+ return sysfs_emit(buf, "%d\n", calibration);
}
static DEVICE_ATTR(rtc_calibration, S_IRUGO | S_IWUSR,
@@ -324,14 +323,13 @@ static const struct rtc_class_ops ab8500_rtc_ops = {
};
static const struct platform_device_id ab85xx_rtc_ids[] = {
- { "ab8500-rtc", (kernel_ulong_t)&ab8500_rtc_ops, },
+ { .name = "ab8500-rtc" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(platform, ab85xx_rtc_ids);
static int ab8500_rtc_probe(struct platform_device *pdev)
{
- const struct platform_device_id *platid = platform_get_device_id(pdev);
int err;
struct rtc_device *rtc;
u8 rtc_ctrl;
@@ -367,7 +365,7 @@ static int ab8500_rtc_probe(struct platform_device *pdev)
if (IS_ERR(rtc))
return PTR_ERR(rtc);
- rtc->ops = (struct rtc_class_ops *)platid->driver_data;
+ rtc->ops = &ab8500_rtc_ops;
err = devm_request_threaded_irq(&pdev->dev, irq, NULL,
rtc_alarm_handler, IRQF_ONESHOT,

drivers/rtc/rtc-abx80x.c

View file
diff --git a/drivers/rtc/rtc-abx80x.c b/drivers/rtc/rtc-abx80x.c
index 00d7de6..5486d9d 100644
--- a/drivers/rtc/rtc-abx80x.c
+++ b/drivers/rtc/rtc-abx80x.c
@@ -545,7 +545,8 @@ static int abx80x_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
status &= ~ABX8XX_STATUS_BLF;
- tmp = i2c_smbus_write_byte_data(client, ABX8XX_REG_STATUS, 0);
+ tmp = i2c_smbus_write_byte_data(client, ABX8XX_REG_STATUS,
+ status);
if (tmp < 0)
return tmp;
@@ -752,16 +753,16 @@ static int abx80x_setup_nvmem(struct abx80x_priv *priv)
}
static const struct i2c_device_id abx80x_id[] = {
- { "abx80x", ABX80X },
- { "ab0801", AB0801 },
- { "ab0803", AB0803 },
- { "ab0804", AB0804 },
- { "ab0805", AB0805 },
- { "ab1801", AB1801 },
- { "ab1803", AB1803 },
- { "ab1804", AB1804 },
- { "ab1805", AB1805 },
- { "rv1805", RV1805 },
+ { .name = "abx80x", .driver_data = ABX80X },
+ { .name = "ab0801", .driver_data = AB0801 },
+ { .name = "ab0803", .driver_data = AB0803 },
+ { .name = "ab0804", .driver_data = AB0804 },
+ { .name = "ab0805", .driver_data = AB0805 },
+ { .name = "ab1801", .driver_data = AB1801 },
+ { .name = "ab1803", .driver_data = AB1803 },
+ { .name = "ab1804", .driver_data = AB1804 },
+ { .name = "ab1805", .driver_data = AB1805 },
+ { .name = "rv1805", .driver_data = RV1805 },
{ }
};
MODULE_DEVICE_TABLE(i2c, abx80x_id);

drivers/rtc/rtc-aspeed.c

View file
diff --git a/drivers/rtc/rtc-aspeed.c b/drivers/rtc/rtc-aspeed.c
index 0d0053b..8f5b440 100644
--- a/drivers/rtc/rtc-aspeed.c
+++ b/drivers/rtc/rtc-aspeed.c
@@ -111,6 +111,7 @@ static const struct of_device_id aspeed_rtc_match[] = {
{ .compatible = "aspeed,ast2400-rtc", },
{ .compatible = "aspeed,ast2500-rtc", },
{ .compatible = "aspeed,ast2600-rtc", },
+ { .compatible = "aspeed,ast2700-rtc", },
{}
};
MODULE_DEVICE_TABLE(of, aspeed_rtc_match);

drivers/rtc/rtc-bd70528.c

View file
diff --git a/drivers/rtc/rtc-bd70528.c b/drivers/rtc/rtc-bd70528.c
index 4c85997..482810b 100644
--- a/drivers/rtc/rtc-bd70528.c
+++ b/drivers/rtc/rtc-bd70528.c
@@ -341,10 +341,10 @@ static int bd70528_probe(struct platform_device *pdev)
}
static const struct platform_device_id bd718x7_rtc_id[] = {
- { "bd71828-rtc", ROHM_CHIP_TYPE_BD71828 },
- { "bd71815-rtc", ROHM_CHIP_TYPE_BD71815 },
- { "bd72720-rtc", ROHM_CHIP_TYPE_BD72720 },
- { },
+ { .name = "bd71828-rtc", .driver_data = ROHM_CHIP_TYPE_BD71828 },
+ { .name = "bd71815-rtc", .driver_data = ROHM_CHIP_TYPE_BD71815 },
+ { .name = "bd72720-rtc", .driver_data = ROHM_CHIP_TYPE_BD72720 },
+ { }
};
MODULE_DEVICE_TABLE(platform, bd718x7_rtc_id);

drivers/rtc/rtc-bq32k.c

View file
diff --git a/drivers/rtc/rtc-bq32k.c b/drivers/rtc/rtc-bq32k.c
index 7ad3453..5732316 100644
--- a/drivers/rtc/rtc-bq32k.c
+++ b/drivers/rtc/rtc-bq32k.c
@@ -16,6 +16,7 @@
#include <linux/kstrtox.h>
#include <linux/errno.h>
#include <linux/bcd.h>
+#include <linux/delay.h>
#define BQ32K_SECONDS 0x00 /* Seconds register address */
#define BQ32K_SECONDS_MASK 0x7F /* Mask over seconds value */
@@ -89,9 +90,17 @@ static int bq32k_write(struct device *dev, void *data, uint8_t off, uint8_t len)
static int bq32k_rtc_read_time(struct device *dev, struct rtc_time *tm)
{
+ struct i2c_client *client = to_i2c_client(dev);
struct bq32k_regs regs;
int error;
+ /*
+ * When the device doesn't have the interrupt connected, prevent
+ * userpace from polling the RTC registers too frequently.
+ */
+ if (client->irq <= 0)
+ usleep_range(2000, 2500);
+
error = bq32k_read(dev, &regs, 0, sizeof(regs));
if (error)
return error;
@@ -304,7 +313,7 @@ static void bq32k_remove(struct i2c_client *client)
}
static const struct i2c_device_id bq32k_id[] = {
- { "bq32000" },
+ { .name = "bq32000" },
{ }
};
MODULE_DEVICE_TABLE(i2c, bq32k_id);

drivers/rtc/rtc-cmos.c

View file
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index f89ab58..fa04ece 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -934,6 +934,7 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
unsigned char rtc_control;
unsigned address_space;
u32 flags = 0;
+ bool hpet_registered = false;
struct nvmem_config nvmem_cfg = {
.name = "cmos_nvram",
.word_size = 1,
@@ -1091,6 +1092,7 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
" failed in rtc_init().");
goto cleanup1;
}
+ hpet_registered = true;
} else
rtc_cmos_int_handler = cmos_interrupt;
@@ -1140,6 +1142,10 @@ cleanup2:
if (is_valid_irq(rtc_irq))
free_irq(rtc_irq, cmos_rtc.rtc);
cleanup1:
+ if (hpet_registered) {
+ hpet_mask_rtc_irq_bit(RTC_IRQMASK);
+ hpet_unregister_irq_handler(cmos_interrupt);
+ }
cmos_rtc.dev = NULL;
cleanup0:
if (RTC_IOMAPPED)

drivers/rtc/rtc-cros-ec.c

View file
diff --git a/drivers/rtc/rtc-cros-ec.c b/drivers/rtc/rtc-cros-ec.c
index e956505..f3ecd01 100644
--- a/drivers/rtc/rtc-cros-ec.c
+++ b/drivers/rtc/rtc-cros-ec.c
@@ -388,8 +388,8 @@ static void cros_ec_rtc_remove(struct platform_device *pdev)
}
static const struct platform_device_id cros_ec_rtc_id[] = {
- { DRV_NAME, 0 },
- {}
+ { .name = DRV_NAME },
+ { }
};
MODULE_DEVICE_TABLE(platform, cros_ec_rtc_id);

drivers/rtc/rtc-ds1307.c

View file
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 7205c59..0707ded 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -269,6 +269,16 @@ static int ds1307_get_time(struct device *dev, struct rtc_time *t)
if (tmp & DS1338_BIT_OSF)
return -EINVAL;
break;
+ case ds_1337:
+ case ds_1339:
+ case ds_1341:
+ case ds_3231:
+ ret = regmap_read(ds1307->regmap, DS1337_REG_STATUS, &tmp);
+ if (ret)
+ return ret;
+ if (tmp & DS1337_BIT_OSF)
+ return -EINVAL;
+ break;
case ds_1340:
if (tmp & DS1340_BIT_nEOSC)
return -EINVAL;
@@ -279,13 +289,6 @@ static int ds1307_get_time(struct device *dev, struct rtc_time *t)
if (tmp & DS1340_BIT_OSF)
return -EINVAL;
break;
- case ds_1341:
- ret = regmap_read(ds1307->regmap, DS1337_REG_STATUS, &tmp);
- if (ret)
- return ret;
- if (tmp & DS1337_BIT_OSF)
- return -EINVAL;
- break;
case ds_1388:
ret = regmap_read(ds1307->regmap, DS1388_REG_FLAG, &tmp);
if (ret)
@@ -308,7 +311,7 @@ static int ds1307_get_time(struct device *dev, struct rtc_time *t)
t->tm_hour = bcd2bin(tmp);
/* rx8130 is bit position, not BCD */
if (ds1307->type == rx_8130)
- t->tm_wday = fls(regs[DS1307_REG_WDAY] & 0x7f);
+ t->tm_wday = fls(regs[DS1307_REG_WDAY] & 0x7f) - 1;
else
t->tm_wday = bcd2bin(regs[DS1307_REG_WDAY] & 0x07) - 1;
t->tm_mday = bcd2bin(regs[DS1307_REG_MDAY] & 0x3f);
@@ -380,14 +383,17 @@ static int ds1307_set_time(struct device *dev, struct rtc_time *t)
regmap_update_bits(ds1307->regmap, DS1307_REG_CONTROL,
DS1338_BIT_OSF, 0);
break;
- case ds_1340:
- regmap_update_bits(ds1307->regmap, DS1340_REG_FLAG,

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-ds1374.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-ds1672.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-ds3232.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-em3027.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-fm3130.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-hym8563.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-isl12022.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-isl12026.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-isl1208.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-m41t80.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-m41t93.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-max31335.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-max6900.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-max77686.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-max8997.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-max8998.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-mpfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-msc313.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-mv.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-nct3018y.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-pcap.c

View before deletion

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-pcf2127.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-pcf85063.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-pcf8523.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-pcf8563.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-pcf8583.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-renesas-rtca3.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-rs5c372.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-rv3029c2.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-rv8803.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-rx6110.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-rx8010.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-rx8025.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-rx8581.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-s35390a.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-s5m.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-sd2405al.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-sd3078.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-tps6594.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-x1205.c

View file

This diff is incomplete. Download the complete patch.

include/linux/rtc.h

View file

This diff is incomplete. Download the complete patch.