Skip to content

Commit b349de4

Browse files
committed
Merge tag 'rtc-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC updates from Alexandre Belloni: "The isl1208 dirver was reworked tobe able to work as part of an MFD. All the Loongson chips are now supported through a new driver, the old one is removed. Summary: Subsystem: - Switch i2c drivers back to use .probe() - Constify pointers to hwmon_channel_info New driver: - Loongson on chip RTC, replacing the Loongson 1 only driver Drivers: - isl1208: cleanup and support for RAA215300 - st-lpc: cleanups - stm32: fix wakeup" * tag 'rtc-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (21 commits) rtc: Add rtc driver for the Loongson family chips rtc: Remove the Loongson-1 RTC driver dt-bindings: rtc: Split loongson,ls2x-rtc into SoC-based compatibles rtc: rv3028: make rv3028 probeable from userspace rtc: isl1208: Add support for the built-in RTC on the PMIC RAA215300 rtc: isl1208: Add isl1208_set_xtoscb() rtc: isl1208: Drop enum isl1208_id and split isl1208_configs[] rtc: isl1208: Make similar I2C and DT-based matching table rtc: isl1208: Drop name variable dt-bindings: rtc: isil,isl1208: Document clock and clock-names properties dt-bindings: rtc: isl1208: Convert to json-schema rtc: st-lpc: Simplify clk handling in st_rtc_probe() rtc: st-lpc: Release some resources in st_rtc_probe() in case of error rtc: stm32: remove dedicated wakeup management dt-bindings: rtc: restrict node name suffixes rtc: add HAS_IOPORT dependencies rtc: Switch i2c drivers back to use .probe() rtc: rv3032: constify pointers to hwmon_channel_info rtc: isl12022: constify pointers to hwmon_channel_info rtc: ds3232: constify pointers to hwmon_channel_info ...
2 parents a741958 + 1b733a9 commit b349de4

46 files changed

Lines changed: 726 additions & 350 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/devicetree/bindings/rtc/isil,isl1208.txt

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/rtc/isil,isl1208.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Intersil ISL1209/19 I2C RTC/Alarm chip with event in
8+
9+
maintainers:
10+
- Biju Das <biju.das.jz@bp.renesas.com>
11+
- Trent Piepho <tpiepho@gmail.com>
12+
13+
description:
14+
ISL12X9 have additional pins EVIN and EVDET for tamper detection, while the
15+
ISL1208 and ISL1218 do not.
16+
17+
properties:
18+
compatible:
19+
enum:
20+
- isil,isl1208
21+
- isil,isl1209
22+
- isil,isl1218
23+
- isil,isl1219
24+
25+
reg:
26+
maxItems: 1
27+
28+
clocks:
29+
maxItems: 1
30+
31+
clock-names:
32+
description: |
33+
Use xin, if connected to an external crystal.
34+
Use clkin, if connected to an external clock signal.
35+
enum:
36+
- xin
37+
- clkin
38+
39+
interrupts:
40+
minItems: 1
41+
maxItems: 2
42+
43+
interrupt-names:
44+
minItems: 1
45+
items:
46+
- const: irq
47+
- const: evdet
48+
49+
isil,ev-evienb:
50+
$ref: /schemas/types.yaml#/definitions/uint32
51+
enum: [ 0, 1 ]
52+
description: |
53+
Enable or disable internal pull on EVIN pin
54+
Default will leave the non-volatile configuration of the pullup
55+
as is.
56+
<0> : Enables internal pull-up on evin pin
57+
<1> : Disables internal pull-up on evin pin
58+
59+
required:
60+
- compatible
61+
- reg
62+
63+
allOf:
64+
- $ref: rtc.yaml#
65+
- if:
66+
properties:
67+
compatible:
68+
contains:
69+
enum:
70+
- isil,isl1209
71+
- isil,isl1219
72+
then:
73+
properties:
74+
interrupts:
75+
maxItems: 2
76+
interrupt-names:
77+
items:
78+
- const: irq
79+
- const: evdet
80+
else:
81+
properties:
82+
interrupts:
83+
maxItems: 1
84+
interrupt-names:
85+
items:
86+
- const: irq
87+
88+
unevaluatedProperties: false
89+
90+
examples:
91+
- |
92+
i2c {
93+
#address-cells = <1>;
94+
#size-cells = <0>;
95+
96+
rtc_twi: rtc@6f {
97+
compatible = "isil,isl1208";
98+
reg = <0x6f>;
99+
};
100+
};
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/rtc/loongson,rtc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Loongson Real-Time Clock
8+
9+
description:
10+
The Loongson family chips use an on-chip counter 0 (Time Of Year
11+
counter) as the RTC.
12+
13+
maintainers:
14+
- Binbin Zhou <zhoubinbin@loongson.cn>
15+
16+
allOf:
17+
- $ref: rtc.yaml#
18+
19+
properties:
20+
compatible:
21+
oneOf:
22+
- enum:
23+
- loongson,ls1b-rtc
24+
- loongson,ls1c-rtc
25+
- loongson,ls7a-rtc
26+
- loongson,ls2k1000-rtc
27+
- items:
28+
- enum:
29+
- loongson,ls2k2000-rtc
30+
- loongson,ls2k0500-rtc
31+
- const: loongson,ls7a-rtc
32+
33+
reg:
34+
maxItems: 1
35+
36+
interrupts:
37+
maxItems: 1
38+
39+
required:
40+
- compatible
41+
- reg
42+
43+
unevaluatedProperties: false
44+
45+
examples:
46+
- |
47+
#include <dt-bindings/interrupt-controller/irq.h>
48+
49+
rtc@1fe27800 {
50+
compatible = "loongson,ls2k1000-rtc";
51+
reg = <0x1fe27800 0x100>;
52+
53+
interrupt-parent = <&liointc1>;
54+
interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
55+
};
56+
57+
...

Documentation/devicetree/bindings/rtc/rtc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ description: |
1515
1616
properties:
1717
$nodename:
18-
pattern: "^rtc(@.*|-[0-9a-f])*$"
18+
pattern: "^rtc(@.*|-([0-9]|[1-9][0-9]+))?$"
1919

2020
aux-voltage-chargeable:
2121
$ref: /schemas/types.yaml#/definitions/uint32

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ properties:
4747
- isil,isl1218
4848
# Intersil ISL12022 Real-time Clock
4949
- isil,isl12022
50-
# Loongson-2K Socs/LS7A bridge Real-time Clock
51-
- loongson,ls2x-rtc
5250
# Real Time Clock Module with I2C-Bus
5351
- microcrystal,rv3029
5452
# Real Time Clock

drivers/rtc/Kconfig

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,7 @@ comment "Platform RTC drivers"
956956
config RTC_DRV_CMOS
957957
tristate "PC-style 'CMOS'"
958958
depends on X86 || ARM || PPC || MIPS || SPARC64
959+
depends on HAS_IOPORT || MACH_DECSTATION
959960
default y if X86
960961
select RTC_MC146818_LIB
961962
help
@@ -976,6 +977,7 @@ config RTC_DRV_CMOS
976977
config RTC_DRV_ALPHA
977978
bool "Alpha PC-style CMOS"
978979
depends on ALPHA
980+
depends on HAS_IOPORT
979981
select RTC_MC146818_LIB
980982
default y
981983
help
@@ -1193,7 +1195,7 @@ config RTC_DRV_MSM6242
11931195

11941196
config RTC_DRV_BQ4802
11951197
tristate "TI BQ4802"
1196-
depends on HAS_IOMEM
1198+
depends on HAS_IOMEM && HAS_IOPORT
11971199
help
11981200
If you say Y here you will get support for the TI
11991201
BQ4802 RTC chip.
@@ -1685,6 +1687,19 @@ config RTC_DRV_JZ4740
16851687
This driver can also be built as a module. If so, the module
16861688
will be called rtc-jz4740.
16871689

1690+
config RTC_DRV_LOONGSON
1691+
tristate "Loongson On-chip RTC"
1692+
depends on MACH_LOONGSON32 || MACH_LOONGSON64 || COMPILE_TEST
1693+
select REGMAP_MMIO
1694+
help
1695+
This is a driver for the Loongson on-chip Counter0 (Time-Of-Year
1696+
counter) to be used as a RTC.
1697+
It can be found on Loongson-1 series cpu, Loongson-2K series cpu
1698+
and Loongson LS7A bridge chips.
1699+
1700+
This driver can also be built as a module. If so, the module
1701+
will be called rtc-loongson.
1702+
16881703
config RTC_DRV_LPC24XX
16891704
tristate "NXP RTC for LPC178x/18xx/408x/43xx"
16901705
depends on ARCH_LPC18XX || COMPILE_TEST
@@ -1726,16 +1741,6 @@ config RTC_DRV_TEGRA
17261741
This drive can also be built as a module. If so, the module
17271742
will be called rtc-tegra.
17281743

1729-
config RTC_DRV_LOONGSON1
1730-
tristate "loongson1 RTC support"
1731-
depends on MACH_LOONGSON32
1732-
help
1733-
This is a driver for the loongson1 on-chip Counter0 (Time-Of-Year
1734-
counter) to be used as a RTC.
1735-
1736-
This driver can also be built as a module. If so, the module
1737-
will be called rtc-ls1x.
1738-
17391744
config RTC_DRV_MXC
17401745
tristate "Freescale MXC Real Time Clock"
17411746
depends on ARCH_MXC || COMPILE_TEST

drivers/rtc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ obj-$(CONFIG_RTC_DRV_ISL12022) += rtc-isl12022.o
7878
obj-$(CONFIG_RTC_DRV_ISL12026) += rtc-isl12026.o
7979
obj-$(CONFIG_RTC_DRV_ISL1208) += rtc-isl1208.o
8080
obj-$(CONFIG_RTC_DRV_JZ4740) += rtc-jz4740.o
81-
obj-$(CONFIG_RTC_DRV_LOONGSON1) += rtc-ls1x.o
81+
obj-$(CONFIG_RTC_DRV_LOONGSON) += rtc-loongson.o
8282
obj-$(CONFIG_RTC_DRV_LP8788) += rtc-lp8788.o
8383
obj-$(CONFIG_RTC_DRV_LPC24XX) += rtc-lpc24xx.o
8484
obj-$(CONFIG_RTC_DRV_LPC32XX) += rtc-lpc32xx.o

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ static struct i2c_driver abb5zes3_driver = {
944944
.pm = &abb5zes3_rtc_pm_ops,
945945
.of_match_table = of_match_ptr(abb5zes3_dt_match),
946946
},
947-
.probe_new = abb5zes3_probe,
947+
.probe = abb5zes3_probe,
948948
.id_table = abb5zes3_id,
949949
};
950950
module_i2c_driver(abb5zes3_driver);

drivers/rtc/rtc-ab-eoz9.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ static const struct hwmon_channel_info abeoz9_temp = {
455455
.config = abeoz9_temp_config,
456456
};
457457

458-
static const struct hwmon_channel_info *abeoz9_info[] = {
458+
static const struct hwmon_channel_info * const abeoz9_info[] = {
459459
&abeoz9_chip,
460460
&abeoz9_temp,
461461
NULL
@@ -584,7 +584,7 @@ static struct i2c_driver abeoz9_driver = {
584584
.name = "rtc-ab-eoz9",
585585
.of_match_table = of_match_ptr(abeoz9_dt_match),
586586
},
587-
.probe_new = abeoz9_probe,
587+
.probe = abeoz9_probe,
588588
.id_table = abeoz9_id,
589589
};
590590

drivers/rtc/rtc-abx80x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ static struct i2c_driver abx80x_driver = {
992992
.name = "rtc-abx80x",
993993
.of_match_table = of_match_ptr(abx80x_of_match),
994994
},
995-
.probe_new = abx80x_probe,
995+
.probe = abx80x_probe,
996996
.id_table = abx80x_id,
997997
};
998998

0 commit comments

Comments
 (0)