Skip to content

Commit d2f51b3

Browse files
committed
Merge tag 'rtc-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/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 ...
2 parents 7b2c9e4 + cfb6762 commit d2f51b3

26 files changed

+620
-108
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/rtc/cirrus,ep9301-rtc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Cirrus EP93xx Real Time Clock controller
8+
9+
maintainers:
10+
- Hartley Sweeten <[email protected]>
11+
- Alexander Sverdlin <[email protected]>
12+
13+
allOf:
14+
- $ref: rtc.yaml#
15+
16+
properties:
17+
compatible:
18+
oneOf:
19+
- const: cirrus,ep9301-rtc
20+
- items:
21+
- enum:
22+
- cirrus,ep9302-rtc
23+
- cirrus,ep9307-rtc
24+
- cirrus,ep9312-rtc
25+
- cirrus,ep9315-rtc
26+
- const: cirrus,ep9301-rtc
27+
28+
reg:
29+
maxItems: 1
30+
31+
required:
32+
- compatible
33+
- reg
34+
35+
unevaluatedProperties: false
36+
37+
examples:
38+
- |
39+
rtc@80920000 {
40+
compatible = "cirrus,ep9301-rtc";
41+
reg = <0x80920000 0x100>;
42+
};

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

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/rtc/epson,rtc7301.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Epson Toyocom RTC-7301SF/DG
8+
9+
description:
10+
The only difference between the two variants is the packaging.
11+
The DG variant is a DIL package, and the SF variant is a flat
12+
package.
13+
14+
maintainers:
15+
- Akinobu Mita <[email protected]>
16+
17+
properties:
18+
compatible:
19+
enum:
20+
- epson,rtc7301dg
21+
- epson,rtc7301sf
22+
23+
reg:
24+
maxItems: 1
25+
26+
reg-io-width:
27+
description:
28+
The size (in bytes) of the IO accesses that should be performed
29+
on the device.
30+
enum: [1, 4]
31+
default: 4
32+
33+
interrupts:
34+
maxItems: 1
35+
36+
required:
37+
- compatible
38+
- reg
39+
40+
additionalProperties: false
41+
42+
examples:
43+
- |
44+
#include <dt-bindings/interrupt-controller/irq.h>
45+
rtc: rtc@44a00000 {
46+
compatible = "epson,rtc7301dg";
47+
reg = <0x44a00000 0x10000>;
48+
reg-io-width = <4>;
49+
interrupt-parent = <&axi_intc_0>;
50+
interrupts = <3 2>;
51+
};

Documentation/devicetree/bindings/rtc/maxim,mcp795.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.

Documentation/devicetree/bindings/rtc/microcrystal,rv3032.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ properties:
3838
- 3000
3939
- 4400
4040

41+
wakeup-source: true
42+
4143
required:
4244
- compatible
4345
- reg
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/rtc/mstar,ssd202d-rtc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Mstar SSD202D Real Time Clock
8+
9+
maintainers:
10+
- Daniel Palmer <[email protected]>
11+
- Romain Perier <[email protected]>
12+
13+
allOf:
14+
- $ref: rtc.yaml#
15+
16+
properties:
17+
compatible:
18+
enum:
19+
- mstar,ssd202d-rtc
20+
reg:
21+
maxItems: 1
22+
23+
required:
24+
- compatible
25+
- reg
26+
27+
unevaluatedProperties: false
28+
29+
examples:
30+
- |
31+
rtc@6800 {
32+
compatible = "mstar,ssd202d-rtc";
33+
reg = <0x6800 0x200>;
34+
};
35+
...
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/rtc/nxp,pcf2123.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: NXP PCF2123 SPI Real Time Clock
8+
9+
maintainers:
10+
- Javier Carrasco <[email protected]>
11+
12+
allOf:
13+
- $ref: /schemas/spi/spi-peripheral-props.yaml#
14+
- $ref: rtc.yaml#
15+
16+
properties:
17+
compatible:
18+
enum:
19+
- nxp,pcf2123
20+
21+
reg:
22+
maxItems: 1
23+
24+
interrupts:
25+
maxItems: 1
26+
27+
required:
28+
- compatible
29+
- reg
30+
31+
unevaluatedProperties: false
32+
33+
examples:
34+
- |
35+
#include <dt-bindings/interrupt-controller/arm-gic.h>
36+
spi {
37+
#address-cells = <1>;
38+
#size-cells = <0>;
39+
40+
rtc@3 {
41+
compatible = "nxp,pcf2123";
42+
reg = <3>;
43+
interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_LOW>;
44+
spi-cs-high;
45+
};
46+
};
47+
...

Documentation/devicetree/bindings/rtc/nxp,pcf8523.txt

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/rtc/nxp,pcf8523.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: NXP PCF8523 Real Time Clock
8+
9+
maintainers:
10+
- Sam Ravnborg <[email protected]>
11+
12+
allOf:
13+
- $ref: rtc.yaml#
14+
15+
properties:
16+
compatible:
17+
const: nxp,pcf8523
18+
19+
reg:
20+
maxItems: 1
21+
22+
quartz-load-femtofarads:
23+
description:
24+
The capacitive load of the crystal, expressed in femto Farad (fF).
25+
enum: [ 7000, 12500 ]
26+
default: 12500
27+
28+
required:
29+
- compatible
30+
- reg
31+
32+
unevaluatedProperties: false
33+
34+
examples:
35+
- |
36+
i2c {
37+
#address-cells = <1>;
38+
#size-cells = <0>;
39+
40+
rtc@68 {
41+
compatible = "nxp,pcf8523";
42+
reg = <0x68>;
43+
quartz-load-femtofarads = <7000>;
44+
};
45+
};

Documentation/devicetree/bindings/rtc/nxp,rtc-2123.txt

Lines changed: 0 additions & 17 deletions
This file was deleted.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ properties:
4545
- isil,isl1208
4646
# Intersil ISL1218 Low Power RTC with Battery Backed SRAM
4747
- isil,isl1218
48+
# SPI-BUS INTERFACE REAL TIME CLOCK MODULE
49+
- maxim,mcp795
4850
# Real Time Clock Module with I2C-Bus
4951
- microcrystal,rv3029
5052
# Real Time Clock

drivers/rtc/Kconfig

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ config RTC_DRV_DIGICOLOR
13511351

13521352
config RTC_DRV_IMXDI
13531353
tristate "Freescale IMX DryIce Real Time Clock"
1354-
depends on ARCH_MXC
1354+
depends on ARCH_MXC || COMPILE_TEST
13551355
depends on OF
13561356
help
13571357
Support for Freescale IMX DryIce RTC
@@ -1984,4 +1984,15 @@ config RTC_DRV_POLARFIRE_SOC
19841984
This driver can also be built as a module, if so, the module
19851985
will be called "rtc-mpfs".
19861986

1987+
config RTC_DRV_SSD202D
1988+
tristate "SigmaStar SSD202D RTC"
1989+
depends on ARCH_MSTARV7 || COMPILE_TEST
1990+
default ARCH_MSTARV7
1991+
help
1992+
If you say yes here you get support for the SigmaStar SSD202D On-Chip
1993+
Real Time Clock.
1994+
1995+
This driver can also be built as a module, if so, the module
1996+
will be called "rtc-ssd20xd".
1997+
19871998
endif # RTC_CLASS

drivers/rtc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ obj-$(CONFIG_RTC_DRV_MESON) += rtc-meson.o
103103
obj-$(CONFIG_RTC_DRV_MOXART) += rtc-moxart.o
104104
obj-$(CONFIG_RTC_DRV_MPC5121) += rtc-mpc5121.o
105105
obj-$(CONFIG_RTC_DRV_MSC313) += rtc-msc313.o
106+
obj-$(CONFIG_RTC_DRV_SSD202D) += rtc-ssd202d.o
106107
obj-$(CONFIG_RTC_DRV_MSM6242) += rtc-msm6242.o
107108
obj-$(CONFIG_RTC_DRV_MT2712) += rtc-mt2712.o
108109
obj-$(CONFIG_RTC_DRV_MT6397) += rtc-mt6397.o

drivers/rtc/rtc-at91rm9200.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -558,16 +558,14 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
558558
/*
559559
* Disable and remove the RTC driver
560560
*/
561-
static int __exit at91_rtc_remove(struct platform_device *pdev)
561+
static void __exit at91_rtc_remove(struct platform_device *pdev)
562562
{
563563
/* Disable all interrupts */
564564
at91_rtc_write_idr(AT91_RTC_ACKUPD | AT91_RTC_ALARM |
565565
AT91_RTC_SECEV | AT91_RTC_TIMEV |
566566
AT91_RTC_CALEV);
567567

568568
clk_disable_unprepare(sclk);
569-
570-
return 0;
571569
}
572570

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

636634
static SIMPLE_DEV_PM_OPS(at91_rtc_pm_ops, at91_rtc_suspend, at91_rtc_resume);
637635

638-
static struct platform_driver at91_rtc_driver = {
639-
.remove = __exit_p(at91_rtc_remove),
636+
/*
637+
* at91_rtc_remove() lives in .exit.text. For drivers registered via
638+
* module_platform_driver_probe() this is ok because they cannot get unbound at
639+
* runtime. So mark the driver struct with __refdata to prevent modpost
640+
* triggering a section mismatch warning.
641+
*/
642+
static struct platform_driver at91_rtc_driver __refdata = {
643+
.remove_new = __exit_p(at91_rtc_remove),
640644
.shutdown = at91_rtc_shutdown,
641645
.driver = {
642646
.name = "at91_rtc",

0 commit comments

Comments
 (0)