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
  ...
This commit is contained in:
Linus Torvalds
2023-07-03 10:43:10 -07:00
46 changed files with 726 additions and 350 deletions

View File

@@ -1,38 +0,0 @@
Intersil ISL1209/19 I2C RTC/Alarm chip with event in
ISL12X9 have additional pins EVIN and #EVDET for tamper detection, while the
ISL1208 and ISL1218 do not. They are all use the same driver with the bindings
described here, with chip specific properties as noted.
Required properties supported by the device:
- "compatible": Should be one of the following:
- "isil,isl1208"
- "isil,isl1209"
- "isil,isl1218"
- "isil,isl1219"
- "reg": I2C bus address of the device
Optional properties:
- "interrupt-names": list which may contains "irq" and "evdet"
evdet applies to isl1209 and isl1219 only
- "interrupts": list of interrupts for "irq" and "evdet"
evdet applies to isl1209 and isl1219 only
- "isil,ev-evienb": Enable or disable internal pull on EVIN pin
Applies to isl1209 and isl1219 only
Possible values are 0 and 1
Value 0 enables internal pull-up on evin pin, 1 disables it.
Default will leave the non-volatile configuration of the pullup
as is.
Example isl1219 node with #IRQ pin connected to SoC gpio1 pin12 and #EVDET pin
connected to SoC gpio2 pin 24 and internal pull-up enabled in EVIN pin.
isl1219: rtc@68 {
compatible = "isil,isl1219";
reg = <0x68>;
interrupt-names = "irq", "evdet";
interrupts-extended = <&gpio1 12 IRQ_TYPE_EDGE_FALLING>,
<&gpio2 24 IRQ_TYPE_EDGE_FALLING>;
isil,ev-evienb = <1>;
};

View File

@@ -0,0 +1,100 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/isil,isl1208.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Intersil ISL1209/19 I2C RTC/Alarm chip with event in
maintainers:
- Biju Das <biju.das.jz@bp.renesas.com>
- Trent Piepho <tpiepho@gmail.com>
description:
ISL12X9 have additional pins EVIN and EVDET for tamper detection, while the
ISL1208 and ISL1218 do not.
properties:
compatible:
enum:
- isil,isl1208
- isil,isl1209
- isil,isl1218
- isil,isl1219
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
description: |
Use xin, if connected to an external crystal.
Use clkin, if connected to an external clock signal.
enum:
- xin
- clkin
interrupts:
minItems: 1
maxItems: 2
interrupt-names:
minItems: 1
items:
- const: irq
- const: evdet
isil,ev-evienb:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [ 0, 1 ]
description: |
Enable or disable internal pull on EVIN pin
Default will leave the non-volatile configuration of the pullup
as is.
<0> : Enables internal pull-up on evin pin
<1> : Disables internal pull-up on evin pin
required:
- compatible
- reg
allOf:
- $ref: rtc.yaml#
- if:
properties:
compatible:
contains:
enum:
- isil,isl1209
- isil,isl1219
then:
properties:
interrupts:
maxItems: 2
interrupt-names:
items:
- const: irq
- const: evdet
else:
properties:
interrupts:
maxItems: 1
interrupt-names:
items:
- const: irq
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
rtc_twi: rtc@6f {
compatible = "isil,isl1208";
reg = <0x6f>;
};
};

View File

@@ -0,0 +1,57 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/loongson,rtc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Loongson Real-Time Clock
description:
The Loongson family chips use an on-chip counter 0 (Time Of Year
counter) as the RTC.
maintainers:
- Binbin Zhou <zhoubinbin@loongson.cn>
allOf:
- $ref: rtc.yaml#
properties:
compatible:
oneOf:
- enum:
- loongson,ls1b-rtc
- loongson,ls1c-rtc
- loongson,ls7a-rtc
- loongson,ls2k1000-rtc
- items:
- enum:
- loongson,ls2k2000-rtc
- loongson,ls2k0500-rtc
- const: loongson,ls7a-rtc
reg:
maxItems: 1
interrupts:
maxItems: 1
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
rtc@1fe27800 {
compatible = "loongson,ls2k1000-rtc";
reg = <0x1fe27800 0x100>;
interrupt-parent = <&liointc1>;
interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
};
...

View File

@@ -15,7 +15,7 @@ description: |
properties:
$nodename:
pattern: "^rtc(@.*|-[0-9a-f])*$"
pattern: "^rtc(@.*|-([0-9]|[1-9][0-9]+))?$"
aux-voltage-chargeable:
$ref: /schemas/types.yaml#/definitions/uint32

View File

@@ -47,8 +47,6 @@ properties:
- isil,isl1218
# Intersil ISL12022 Real-time Clock
- isil,isl12022
# Loongson-2K Socs/LS7A bridge Real-time Clock
- loongson,ls2x-rtc
# Real Time Clock Module with I2C-Bus
- microcrystal,rv3029
# Real Time Clock

View File

@@ -956,6 +956,7 @@ comment "Platform RTC drivers"
config RTC_DRV_CMOS
tristate "PC-style 'CMOS'"
depends on X86 || ARM || PPC || MIPS || SPARC64
depends on HAS_IOPORT || MACH_DECSTATION
default y if X86
select RTC_MC146818_LIB
help
@@ -976,6 +977,7 @@ config RTC_DRV_CMOS
config RTC_DRV_ALPHA
bool "Alpha PC-style CMOS"
depends on ALPHA
depends on HAS_IOPORT
select RTC_MC146818_LIB
default y
help
@@ -1193,7 +1195,7 @@ config RTC_DRV_MSM6242
config RTC_DRV_BQ4802
tristate "TI BQ4802"
depends on HAS_IOMEM
depends on HAS_IOMEM && HAS_IOPORT
help
If you say Y here you will get support for the TI
BQ4802 RTC chip.
@@ -1685,6 +1687,19 @@ config RTC_DRV_JZ4740
This driver can also be built as a module. If so, the module
will be called rtc-jz4740.
config RTC_DRV_LOONGSON
tristate "Loongson On-chip RTC"
depends on MACH_LOONGSON32 || MACH_LOONGSON64 || COMPILE_TEST
select REGMAP_MMIO
help
This is a driver for the Loongson on-chip Counter0 (Time-Of-Year
counter) to be used as a RTC.
It can be found on Loongson-1 series cpu, Loongson-2K series cpu
and Loongson LS7A bridge chips.
This driver can also be built as a module. If so, the module
will be called rtc-loongson.
config RTC_DRV_LPC24XX
tristate "NXP RTC for LPC178x/18xx/408x/43xx"
depends on ARCH_LPC18XX || COMPILE_TEST
@@ -1726,16 +1741,6 @@ config RTC_DRV_TEGRA
This drive can also be built as a module. If so, the module
will be called rtc-tegra.
config RTC_DRV_LOONGSON1
tristate "loongson1 RTC support"
depends on MACH_LOONGSON32
help
This is a driver for the loongson1 on-chip Counter0 (Time-Of-Year
counter) to be used as a RTC.
This driver can also be built as a module. If so, the module
will be called rtc-ls1x.
config RTC_DRV_MXC
tristate "Freescale MXC Real Time Clock"
depends on ARCH_MXC || COMPILE_TEST

View File

@@ -78,7 +78,7 @@ obj-$(CONFIG_RTC_DRV_ISL12022) += rtc-isl12022.o
obj-$(CONFIG_RTC_DRV_ISL12026) += rtc-isl12026.o
obj-$(CONFIG_RTC_DRV_ISL1208) += rtc-isl1208.o
obj-$(CONFIG_RTC_DRV_JZ4740) += rtc-jz4740.o
obj-$(CONFIG_RTC_DRV_LOONGSON1) += rtc-ls1x.o
obj-$(CONFIG_RTC_DRV_LOONGSON) += rtc-loongson.o
obj-$(CONFIG_RTC_DRV_LP8788) += rtc-lp8788.o
obj-$(CONFIG_RTC_DRV_LPC24XX) += rtc-lpc24xx.o
obj-$(CONFIG_RTC_DRV_LPC32XX) += rtc-lpc32xx.o

View File

@@ -944,7 +944,7 @@ static struct i2c_driver abb5zes3_driver = {
.pm = &abb5zes3_rtc_pm_ops,
.of_match_table = of_match_ptr(abb5zes3_dt_match),
},
.probe_new = abb5zes3_probe,
.probe = abb5zes3_probe,
.id_table = abb5zes3_id,
};
module_i2c_driver(abb5zes3_driver);

View File

@@ -455,7 +455,7 @@ static const struct hwmon_channel_info abeoz9_temp = {
.config = abeoz9_temp_config,
};
static const struct hwmon_channel_info *abeoz9_info[] = {
static const struct hwmon_channel_info * const abeoz9_info[] = {
&abeoz9_chip,
&abeoz9_temp,
NULL
@@ -584,7 +584,7 @@ static struct i2c_driver abeoz9_driver = {
.name = "rtc-ab-eoz9",
.of_match_table = of_match_ptr(abeoz9_dt_match),
},
.probe_new = abeoz9_probe,
.probe = abeoz9_probe,
.id_table = abeoz9_id,
};

View File

@@ -992,7 +992,7 @@ static struct i2c_driver abx80x_driver = {
.name = "rtc-abx80x",
.of_match_table = of_match_ptr(abx80x_of_match),
},
.probe_new = abx80x_probe,
.probe = abx80x_probe,
.id_table = abx80x_id,
};

View File

@@ -320,7 +320,7 @@ static struct i2c_driver bq32k_driver = {
.name = "bq32k",
.of_match_table = of_match_ptr(bq32k_of_match),
},
.probe_new = bq32k_probe,
.probe = bq32k_probe,
.remove = bq32k_remove,
.id_table = bq32k_id,
};

View File

@@ -2011,7 +2011,7 @@ static struct i2c_driver ds1307_driver = {
.name = "rtc-ds1307",
.of_match_table = ds1307_of_match,
},
.probe_new = ds1307_probe,
.probe = ds1307_probe,
.id_table = ds1307_id,
};

View File

@@ -572,7 +572,7 @@ static struct i2c_driver ds1374_driver = {
.of_match_table = of_match_ptr(ds1374_of_match),
.pm = &ds1374_pm,
},
.probe_new = ds1374_probe,
.probe = ds1374_probe,
.remove = ds1374_remove,
.id_table = ds1374_id,
};

View File

@@ -149,7 +149,7 @@ static struct i2c_driver ds1672_driver = {
.name = "rtc-ds1672",
.of_match_table = of_match_ptr(ds1672_of_match),
},
.probe_new = ds1672_probe,
.probe = ds1672_probe,
.id_table = ds1672_id,
};

View File

@@ -359,7 +359,7 @@ static const struct hwmon_channel_info ds3232_hwmon_temp = {
.config = ds3232_hwmon_temp_config,
};
static const struct hwmon_channel_info *ds3232_hwmon_info[] = {
static const struct hwmon_channel_info * const ds3232_hwmon_info[] = {
&ds3232_hwmon_chip,
&ds3232_hwmon_temp,
NULL
@@ -603,7 +603,7 @@ static struct i2c_driver ds3232_driver = {
.of_match_table = of_match_ptr(ds3232_of_match),
.pm = &ds3232_pm_ops,
},
.probe_new = ds3232_i2c_probe,
.probe = ds3232_i2c_probe,
.id_table = ds3232_id,
};

View File

@@ -147,7 +147,7 @@ static struct i2c_driver em3027_driver = {
.name = "rtc-em3027",
.of_match_table = of_match_ptr(em3027_of_match),
},
.probe_new = em3027_probe,
.probe = em3027_probe,
.id_table = em3027_id,
};

View File

@@ -517,7 +517,7 @@ static struct i2c_driver fm3130_driver = {
.driver = {
.name = "rtc-fm3130",
},
.probe_new = fm3130_probe,
.probe = fm3130_probe,
.id_table = fm3130_id,
};

View File

@@ -576,7 +576,7 @@ static struct i2c_driver hym8563_driver = {
.pm = &hym8563_pm_ops,
.of_match_table = hym8563_dt_idtable,
},
.probe_new = hym8563_probe,
.probe = hym8563_probe,
.id_table = hym8563_id,
};

View File

@@ -89,7 +89,7 @@ static int isl12022_hwmon_read(struct device *dev,
return -EOPNOTSUPP;
}
static const struct hwmon_channel_info *isl12022_hwmon_info[] = {
static const struct hwmon_channel_info * const isl12022_hwmon_info[] = {
HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT),
NULL
};
@@ -262,7 +262,7 @@ static struct i2c_driver isl12022_driver = {
.name = "rtc-isl12022",
.of_match_table = isl12022_dt_match,
},
.probe_new = isl12022_probe,
.probe = isl12022_probe,
.id_table = isl12022_id,
};

View File

@@ -490,7 +490,7 @@ static struct i2c_driver isl12026_driver = {
.name = "rtc-isl12026",
.of_match_table = isl12026_dt_match,
},
.probe_new = isl12026_probe_new,
.probe = isl12026_probe_new,
.remove = isl12026_remove,
};

Some files were not shown because too many files have changed in this diff Show More