Skip to content

Commit

Permalink
Merge tag 'rtc-6.7' 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:
 "There is a new driver for the RTC of the Mstar SSD202D SoC. The
  rtc7301 driver gains support for byte addresses to support the
  USRobotics USR8200. Then we have many non user visible changes and
  typo fixes.

  Summary:

  Subsytem:
   - convert platform drivers to remove_new
   - prevent modpost warnings for unremovable platform drivers

  New driver:
   - Mstar SSD202D

  Drivers:
   - brcmstb-waketimer: support level alarm_irq
   - ep93xx: add DT support
   - rtc7301: support byte-addressed IO"

* tag 'rtc-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (28 commits)
  dt-bindings: rtc: Add Mstar SSD202D RTC
  rtc: Add support for the SSD202D RTC
  rtc: at91rm9200: annotate at91_rtc_remove with __exit again
  dt-bindings: rtc: microcrystal,rv3032: Document wakeup-source property
  dt-bindings: rtc: pcf8523: Convert to YAML
  dt-bindings: rtc: mcp795: move to trivial-rtc
  rtc: ep93xx: add DT support for Cirrus EP93xx
  dt-bindings: rtc: Add Cirrus EP93xx
  dt-bindings: rtc: pcf2123: convert to YAML
  rtc: efi: fixed typo in efi_procfs()
  rtc: omap: Use device_get_match_data()
  rtc: pcf85363: fix wrong mask/val parameters in regmap_update_bits call
  rtc: rtc7301: Support byte-addressed IO
  rtc: rtc7301: Rewrite bindings in schema
  rtc: sh: Convert to platform remove callback returning void
  rtc: pxa: Convert to platform remove callback returning void
  rtc: mv: Convert to platform remove callback returning void
  rtc: imxdi: Convert to platform remove callback returning void
  rtc: at91rm9200: Convert to platform remove callback returning void
  rtc: pcap: Drop no-op remove function
  ...
  • Loading branch information
Linus Torvalds committed Nov 6, 2023
2 parents 7b2c9e4 + cfb6762 commit d2f51b3
Show file tree
Hide file tree
Showing 26 changed files with 620 additions and 108 deletions.
42 changes: 42 additions & 0 deletions Documentation/devicetree/bindings/rtc/cirrus,ep9301-rtc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/cirrus,ep9301-rtc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Cirrus EP93xx Real Time Clock controller

maintainers:
- Hartley Sweeten <hsweeten@visionengravers.com>
- Alexander Sverdlin <alexander.sverdlin@gmail.com>

allOf:
- $ref: rtc.yaml#

properties:
compatible:
oneOf:
- const: cirrus,ep9301-rtc
- items:
- enum:
- cirrus,ep9302-rtc
- cirrus,ep9307-rtc
- cirrus,ep9312-rtc
- cirrus,ep9315-rtc
- const: cirrus,ep9301-rtc

reg:
maxItems: 1

required:
- compatible
- reg

unevaluatedProperties: false

examples:
- |
rtc@80920000 {
compatible = "cirrus,ep9301-rtc";
reg = <0x80920000 0x100>;
};
16 changes: 0 additions & 16 deletions Documentation/devicetree/bindings/rtc/epson,rtc7301.txt

This file was deleted.

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

title: Epson Toyocom RTC-7301SF/DG

description:
The only difference between the two variants is the packaging.
The DG variant is a DIL package, and the SF variant is a flat
package.

maintainers:
- Akinobu Mita <akinobu.mita@gmail.com>

properties:
compatible:
enum:
- epson,rtc7301dg
- epson,rtc7301sf

reg:
maxItems: 1

reg-io-width:
description:
The size (in bytes) of the IO accesses that should be performed
on the device.
enum: [1, 4]
default: 4

interrupts:
maxItems: 1

required:
- compatible
- reg

additionalProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
rtc: rtc@44a00000 {
compatible = "epson,rtc7301dg";
reg = <0x44a00000 0x10000>;
reg-io-width = <4>;
interrupt-parent = <&axi_intc_0>;
interrupts = <3 2>;
};
11 changes: 0 additions & 11 deletions Documentation/devicetree/bindings/rtc/maxim,mcp795.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ properties:
- 3000
- 4400

wakeup-source: true

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

title: Mstar SSD202D Real Time Clock

maintainers:
- Daniel Palmer <daniel@0x0f.com>
- Romain Perier <romain.perier@gmail.com>

allOf:
- $ref: rtc.yaml#

properties:
compatible:
enum:
- mstar,ssd202d-rtc
reg:
maxItems: 1

required:
- compatible
- reg

unevaluatedProperties: false

examples:
- |
rtc@6800 {
compatible = "mstar,ssd202d-rtc";
reg = <0x6800 0x200>;
};
...
47 changes: 47 additions & 0 deletions Documentation/devicetree/bindings/rtc/nxp,pcf2123.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/nxp,pcf2123.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NXP PCF2123 SPI Real Time Clock

maintainers:
- Javier Carrasco <javier.carrasco.cruz@gmail.com>

allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
- $ref: rtc.yaml#

properties:
compatible:
enum:
- nxp,pcf2123

reg:
maxItems: 1

interrupts:
maxItems: 1

required:
- compatible
- reg

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
rtc@3 {
compatible = "nxp,pcf2123";
reg = <3>;
interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_LOW>;
spi-cs-high;
};
};
...
18 changes: 0 additions & 18 deletions Documentation/devicetree/bindings/rtc/nxp,pcf8523.txt

This file was deleted.

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

title: NXP PCF8523 Real Time Clock

maintainers:
- Sam Ravnborg <sam@ravnborg.org>

allOf:
- $ref: rtc.yaml#

properties:
compatible:
const: nxp,pcf8523

reg:
maxItems: 1

quartz-load-femtofarads:
description:
The capacitive load of the crystal, expressed in femto Farad (fF).
enum: [ 7000, 12500 ]
default: 12500

required:
- compatible
- reg

unevaluatedProperties: false

examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
rtc@68 {
compatible = "nxp,pcf8523";
reg = <0x68>;
quartz-load-femtofarads = <7000>;
};
};
17 changes: 0 additions & 17 deletions Documentation/devicetree/bindings/rtc/nxp,rtc-2123.txt

This file was deleted.

2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ properties:
- isil,isl1208
# Intersil ISL1218 Low Power RTC with Battery Backed SRAM
- isil,isl1218
# SPI-BUS INTERFACE REAL TIME CLOCK MODULE
- maxim,mcp795
# Real Time Clock Module with I2C-Bus
- microcrystal,rv3029
# Real Time Clock
Expand Down
13 changes: 12 additions & 1 deletion drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ config RTC_DRV_DIGICOLOR

config RTC_DRV_IMXDI
tristate "Freescale IMX DryIce Real Time Clock"
depends on ARCH_MXC
depends on ARCH_MXC || COMPILE_TEST
depends on OF
help
Support for Freescale IMX DryIce RTC
Expand Down Expand Up @@ -1984,4 +1984,15 @@ config RTC_DRV_POLARFIRE_SOC
This driver can also be built as a module, if so, the module
will be called "rtc-mpfs".

config RTC_DRV_SSD202D
tristate "SigmaStar SSD202D RTC"
depends on ARCH_MSTARV7 || COMPILE_TEST
default ARCH_MSTARV7
help
If you say yes here you get support for the SigmaStar SSD202D On-Chip
Real Time Clock.

This driver can also be built as a module, if so, the module
will be called "rtc-ssd20xd".

endif # RTC_CLASS
1 change: 1 addition & 0 deletions drivers/rtc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ obj-$(CONFIG_RTC_DRV_MESON) += rtc-meson.o
obj-$(CONFIG_RTC_DRV_MOXART) += rtc-moxart.o
obj-$(CONFIG_RTC_DRV_MPC5121) += rtc-mpc5121.o
obj-$(CONFIG_RTC_DRV_MSC313) += rtc-msc313.o
obj-$(CONFIG_RTC_DRV_SSD202D) += rtc-ssd202d.o
obj-$(CONFIG_RTC_DRV_MSM6242) += rtc-msm6242.o
obj-$(CONFIG_RTC_DRV_MT2712) += rtc-mt2712.o
obj-$(CONFIG_RTC_DRV_MT6397) += rtc-mt6397.o
Expand Down
14 changes: 9 additions & 5 deletions drivers/rtc/rtc-at91rm9200.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,16 +558,14 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
/*
* Disable and remove the RTC driver
*/
static int __exit at91_rtc_remove(struct platform_device *pdev)
static void __exit at91_rtc_remove(struct platform_device *pdev)
{
/* Disable all interrupts */
at91_rtc_write_idr(AT91_RTC_ACKUPD | AT91_RTC_ALARM |
AT91_RTC_SECEV | AT91_RTC_TIMEV |
AT91_RTC_CALEV);

clk_disable_unprepare(sclk);

return 0;
}

static void at91_rtc_shutdown(struct platform_device *pdev)
Expand Down Expand Up @@ -635,8 +633,14 @@ static int at91_rtc_resume(struct device *dev)

static SIMPLE_DEV_PM_OPS(at91_rtc_pm_ops, at91_rtc_suspend, at91_rtc_resume);

static struct platform_driver at91_rtc_driver = {
.remove = __exit_p(at91_rtc_remove),
/*
* at91_rtc_remove() lives in .exit.text. For drivers registered via
* module_platform_driver_probe() this is ok because they cannot get unbound at
* runtime. So mark the driver struct with __refdata to prevent modpost
* triggering a section mismatch warning.
*/
static struct platform_driver at91_rtc_driver __refdata = {
.remove_new = __exit_p(at91_rtc_remove),
.shutdown = at91_rtc_shutdown,
.driver = {
.name = "at91_rtc",
Expand Down
Loading

0 comments on commit d2f51b3

Please sign in to comment.