Skip to content

Commit

Permalink
Merge tag 'rtc-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/…
Browse files Browse the repository at this point in the history
…abelloni/linux

Pull RTC updates from Alexandre Belloni:
 "Most of the changes are a rework of the cmos driver by Rafael and
  fixes for issues found using static checkers. The removal of a driver
  leads to a reduction of the number of LOC of the subsystem.

  Removed driver:
   - davinci

  Updates:
   - convert i2c drivers to .probe_new
   - fix spelling mistakes and duplicated words in comments
   - cmos: rework wake setup and ACPI event handling
   - cros-ec: Limit RTC alarm range to fix alarmtimer
   - ds1347: fix century register handling
   - efi: wakeup support
   - isl12022: temperature sensor support
   - pcf85063: fix read_alarm and clkout
   - pcf8523: use stop bit to detect invalid time
   - pcf8563: use RTC_FEATURE_ALARM
   - snvs: be more flexible on LPSRT reads
   - many static checker fixes"

* tag 'rtc-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (48 commits)
  rtc: ds1742: use devm_platform_get_and_ioremap_resource()
  rtc: mxc_v2: Add missing clk_disable_unprepare()
  rtc: rs5c313: correct some spelling mistakes
  rtc: at91rm9200: Fix syntax errors in comments
  rtc: remove duplicated words in comments
  rtc: rv3028: Use IRQ flags obtained from device tree if available
  rtc: ds1307: use sysfs_emit() to instead of scnprintf()
  rtc: isl12026: drop obsolete dependency on COMPILE_TEST
  dt-bindings: rtc: m41t80: Convert text schema to YAML one
  rtc: pcf85063: fix pcf85063_clkout_control
  rtc: rx6110: fix warning with !OF
  rtc: rk808: reduce 'struct rk808' usage
  rtc: msc313: Fix function prototype mismatch in msc313_rtc_probe()
  dt-bindings: rtc: convert rtc-meson.txt to dt-schema
  rtc: pic32: Move devm_rtc_allocate_device earlier in pic32_rtc_probe()
  rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe()
  rtc: pcf85063: Fix reading alarm
  rtc: pcf8523: fix for stop bit
  rtc: efi: Add wakeup support
  rtc: pcf8563: clear RTC_FEATURE_ALARM if no irq
  ...
  • Loading branch information
Linus Torvalds committed Dec 19, 2022
2 parents 9322af3 + e88f319 commit acd04af
Show file tree
Hide file tree
Showing 49 changed files with 674 additions and 1,000 deletions.
62 changes: 62 additions & 0 deletions Documentation/devicetree/bindings/rtc/amlogic,meson6-rtc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/amlogic,meson6-rtc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Amlogic Meson6, Meson8, Meson8b and Meson8m2 RTC

maintainers:
- Neil Armstrong <neil.armstrong@linaro.org>
- Martin Blumenstingl <martin.blumenstingl@googlemail.com>

allOf:
- $ref: rtc.yaml#
- $ref: /schemas/nvmem/nvmem.yaml#

properties:
compatible:
enum:
- amlogic,meson6-rtc
- amlogic,meson8-rtc
- amlogic,meson8b-rtc
- amlogic,meson8m2-rtc

reg:
maxItems: 1

clocks:
maxItems: 1

interrupts:
maxItems: 1

resets:
maxItems: 1

vdd-supply: true

required:
- compatible
- reg

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
rtc: rtc@740 {
compatible = "amlogic,meson6-rtc";
reg = <0x740 0x14>;
interrupts = <GIC_SPI 72 IRQ_TYPE_EDGE_RISING>;
clocks = <&rtc32k_xtal>;
vdd-supply = <&rtc_vdd>;
resets = <&reset_rtc>;
#address-cells = <1>;
#size-cells = <1>;
mac@0 {
reg = <0 6>;
};
};
30 changes: 0 additions & 30 deletions Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt

This file was deleted.

56 changes: 56 additions & 0 deletions Documentation/devicetree/bindings/rtc/haoyu,hym8563.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/haoyu,hym8563.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Haoyu Microelectronics HYM8563 RTC

maintainers:
- Alexandre Belloni <alexandre.belloni@bootlin.com>

properties:
compatible:
const: haoyu,hym8563

reg:
maxItems: 1

interrupts:
maxItems: 1

"#clock-cells":
const: 0

clock-output-names:
description: From common clock binding to override the default output clock name.
maxItems: 1

wakeup-source:
description: Enables wake up of host system on alarm.

allOf:
- $ref: rtc.yaml

unevaluatedProperties: false

required:
- compatible
- reg
- "#clock-cells"

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
rtc@51 {
compatible = "haoyu,hym8563";
reg = <0x51>;
interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
#clock-cells = <0>;
};
};
16 changes: 10 additions & 6 deletions Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ maintainers:

properties:
compatible:
enum:
- qcom,pm8058-rtc
- qcom,pm8921-rtc
- qcom,pm8941-rtc
- qcom,pm8018-rtc
- qcom,pmk8350-rtc
oneOf:
- enum:
- qcom,pm8058-rtc
- qcom,pm8921-rtc
- qcom,pm8941-rtc
- qcom,pmk8350-rtc
- items:
- enum:
- qcom,pm8018-rtc
- const: qcom,pm8921-rtc

reg:
minItems: 1
Expand Down
39 changes: 0 additions & 39 deletions Documentation/devicetree/bindings/rtc/rtc-m41t80.txt

This file was deleted.

35 changes: 0 additions & 35 deletions Documentation/devicetree/bindings/rtc/rtc-meson.txt

This file was deleted.

73 changes: 73 additions & 0 deletions Documentation/devicetree/bindings/rtc/st,m41t80.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/st,m41t80.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ST M41T80 family of RTC and compatible

maintainers:
- Alexandre Belloni <alexandre.belloni@bootlin.com>

properties:
compatible:
enum:
- st,m41t62
- st,m41t65
- st,m41t80
- st,m41t81
- st,m41t81s
- st,m41t82
- st,m41t83
- st,m41t84
- st,m41t85
- st,m41t87
- microcrystal,rv4162

reg:
maxItems: 1

interrupts:
maxItems: 1

"#clock-cells":
const: 1

clock-output-names:
maxItems: 1
description: From common clock binding to override the default output clock name.

clock:
type: object
$ref: /schemas/clock/fixed-clock.yaml#
properties:
clock-frequency:
const: 32768

allOf:
- $ref: rtc.yaml

unevaluatedProperties: false

required:
- compatible
- reg

examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
rtc@68 {
compatible = "st,m41t80";
reg = <0x68>;
interrupt-parent = <&UIC0>;
interrupts = <0x9 0x8>;
clock {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <32768>;
};
};
};
12 changes: 1 addition & 11 deletions drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ config RTC_DRV_ISL12022

config RTC_DRV_ISL12026
tristate "Intersil ISL12026"
depends on OF || COMPILE_TEST
depends on OF
help
If you say yes here you get support for the
Intersil ISL12026 RTC chip.
Expand Down Expand Up @@ -1351,16 +1351,6 @@ config RTC_DRV_ASM9260
This driver can also be built as a module. If so, the module
will be called rtc-asm9260.

config RTC_DRV_DAVINCI
tristate "TI DaVinci RTC"
depends on ARCH_DAVINCI_DM365 || COMPILE_TEST
help
If you say yes here you get support for the RTC on the
DaVinci platforms (DM365).

This driver can also be built as a module. If so, the module
will be called rtc-davinci.

config RTC_DRV_DIGICOLOR
tristate "Conexant Digicolor RTC"
depends on ARCH_DIGICOLOR || COMPILE_TEST
Expand Down
1 change: 0 additions & 1 deletion drivers/rtc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ obj-$(CONFIG_RTC_DRV_CROS_EC) += rtc-cros-ec.o
obj-$(CONFIG_RTC_DRV_DA9052) += rtc-da9052.o
obj-$(CONFIG_RTC_DRV_DA9055) += rtc-da9055.o
obj-$(CONFIG_RTC_DRV_DA9063) += rtc-da9063.o
obj-$(CONFIG_RTC_DRV_DAVINCI) += rtc-davinci.o
obj-$(CONFIG_RTC_DRV_DIGICOLOR) += rtc-digicolor.o
obj-$(CONFIG_RTC_DRV_DM355EVM) += rtc-dm355evm.o
obj-$(CONFIG_RTC_DRV_DS1216) += rtc-ds1216.o
Expand Down
4 changes: 2 additions & 2 deletions drivers/rtc/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,11 @@ struct rtc_device *devm_rtc_allocate_device(struct device *dev)

rtc->id = id;
rtc->dev.parent = dev;
err = dev_set_name(&rtc->dev, "rtc%d", id);
err = devm_add_action_or_reset(dev, devm_rtc_release_device, rtc);
if (err)
return ERR_PTR(err);

err = devm_add_action_or_reset(dev, devm_rtc_release_device, rtc);
err = dev_set_name(&rtc->dev, "rtc%d", id);
if (err)
return ERR_PTR(err);

Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
*
* This could all instead be done in the lower level driver,
* but since more than one lower level RTC implementation needs it,
* then it's probably best best to do it here instead of there..
* then it's probably best to do it here instead of there..
*/

/* Get the "before" timestamp */
Expand Down
Loading

0 comments on commit acd04af

Please sign in to comment.