Commit eadc4e40 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull RTC updates from Alexandre Belloni:
 "The VL_READ and VL_CLR ioctls have been reworked to be more useful.
  This will not break userspace as there are very few users and they are
  using the integer value as a boolean.

  Apart from that, two drivers were reworked and a few fixes here and
  there for a net reduction of number of lines.

  Summary:

  Subsystem:
   - the VL_READ and VL_CLR ioctls are now documented and their behavior
     is unified across all the drivers.
   - RTC_I2C_AND_SPI Kconfig option rework to avoid selecting both
     REGMAP_I2C and REGMAP_SPI unecessarily.

  Drivers:
   - at91rm9200: remove deprecated procfs, add sam9x60, sama5d4 and
     sama5d2 compatibles.
   - cmos: solve lost interrupts issue on MS Surface 3
   - hym8563: return proper errno when time is invalid
   - rv3029: many fixes, nvram support"

* tag 'rtc-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (63 commits)
  dt-bindings: rtc: at91rm9200: document clocks property
  rtc: i2c/spi: Avoid inclusion of REGMAP support when not needed
  rtc: Kconfig: select REGMAP_I2C when necessary
  rtc: Kconfig: properly indent sd3078 entry
  rtc: cmos: Refactor code by using the new dmi_get_bios_year() helper
  rtc: cmos: Use predefined value for RTC IRQ on legacy x86
  rtc: cmos: Stop using shared IRQ
  rtc: tps6586x: Use IRQ_NOAUTOEN flag
  rtc: at91rm9200: use FIELD_PREP/FIELD_GET
  rtc: at91rm9200: avoid time readout in at91_rtc_setalarm
  rtc: at91rm9200: move register definitions to C file
  rtc: at91rm9200: add sama5d4 and sama5d2 compatibles
  dt-bindings: rtc: at91rm9200: convert bindings to json-schema
  rtc: at91rm9200: remove procfs information
  dt-bindings: atmel, at91rm9200-rtc: add microchip, sam9x60-rtc
  rtc: pcf8563: Use BIT
  rtc: moxart: Convert to SPDX identifier
  rtc: ds1343: Remove unused struct spi_device in struct ds1343_priv
  rtc: rx8025: Remove struct i2c_client from struct rx8025_data
  rtc: hym8563: Read the valid flag directly instead of caching it
  ...
parents 322bf2d3 f4571924
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ Aleksey Gorelov <aleksey_gorelov@phoenix.com>
Aleksandar Markovic <aleksandar.markovic@mips.com> <aleksandar.markovic@imgtec.com>
Alex Shi <alex.shi@linux.alibaba.com> <alex.shi@intel.com>
Alex Shi <alex.shi@linux.alibaba.com> <alex.shi@linaro.org>
Alexandre Belloni <alexandre.belloni@bootlin.com> <alexandre.belloni@free-electrons.com>
Alexei Starovoitov <ast@kernel.org> <ast@plumgrid.com>
Alexei Starovoitov <ast@kernel.org> <alexei.starovoitov@gmail.com>
Alexei Starovoitov <ast@kernel.org> <ast@fb.com>
+8 −0
Original line number Diff line number Diff line
@@ -33,6 +33,14 @@ Description:
		  Requires a separate RTC_PIE_ON call to enable the periodic
		  interrupts.

		* RTC_VL_READ: Read the voltage inputs status of the RTC when
		  supported. The value is a bit field of RTC_VL_*, giving the
		  status of the main and backup voltages.

		* RTC_VL_CLEAR: Clear the voltage status of the RTC. Some RTCs
		  need user interaction when the backup power provider is
		  replaced or charged to be able to clear the status.

		The ioctl() calls supported by the older /dev/rtc interface are
		also supported by the newer RTC class framework. However,
		because the chips and systems are not standardized, some PC/AT
+0 −17
Original line number Diff line number Diff line
Atmel AT91RM9200 Real Time Clock

Required properties:
- compatible: should be: "atmel,at91rm9200-rtc" or "atmel,at91sam9x5-rtc"
- reg: physical base address of the controller and length of memory mapped
  region.
- interrupts: rtc alarm/event interrupt
- clocks: phandle to input clock.

Example:

rtc@fffffe00 {
	compatible = "atmel,at91rm9200-rtc";
	reg = <0xfffffe00 0x100>;
	interrupts = <1 4 7>;
	clocks = <&clk32k>;
};
+49 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc/atmel,at91rm9200-rtc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Atmel AT91 RTC Device Tree Bindings

allOf:
  - $ref: "rtc.yaml#"

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

properties:
  compatible:
    enum:
      - atmel,at91rm9200-rtc
      - atmel,at91sam9x5-rtc
      - atmel,sama5d4-rtc
      - atmel,sama5d2-rtc
      - microchip,sam9x60-rtc

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    maxItems: 1

required:
  - compatible
  - reg
  - interrupts
  - clocks

additionalProperties: false

examples:
  - |
    rtc@fffffe00 {
        compatible = "atmel,at91rm9200-rtc";
        reg = <0xfffffe00 0x100>;
        interrupts = <1 4 7>;
        clocks = <&clk32k>;
    };
...
+16 −8
Original line number Diff line number Diff line
@@ -240,6 +240,7 @@ config RTC_DRV_AS3722

config RTC_DRV_DS1307
	tristate "Dallas/Maxim DS1307/37/38/39/40/41, ST M41T00, EPSON RX-8025, ISL12057"
	select REGMAP_I2C
	help
	  If you say yes here you get support for various compatible RTC
	  chips (often with battery backup) connected with I2C. This driver
@@ -622,6 +623,7 @@ config RTC_DRV_RX8010

config RTC_DRV_RX8581
	tristate "Epson RX-8571/RX-8581"
	select REGMAP_I2C
	help
	  If you say yes here you will get support for the Epson RX-8571/
	  RX-8581.
@@ -649,6 +651,7 @@ config RTC_DRV_EM3027

config RTC_DRV_RV3028
	tristate "Micro Crystal RV3028"
	select REGMAP_I2C
	help
	  If you say yes here you get support for the Micro Crystal
	  RV3028.
@@ -678,6 +681,7 @@ config RTC_DRV_S5M

config RTC_DRV_SD3078
	tristate "ZXW Shenzhen whwave SD3078"
	select REGMAP_I2C
	help
	  If you say yes here you get support for the ZXW Shenzhen whwave
	  SD3078 RTC chips.
@@ -849,14 +853,14 @@ config RTC_I2C_AND_SPI
	default m if I2C=m
	default y if I2C=y
	default y if SPI_MASTER=y
	select REGMAP_I2C if I2C
	select REGMAP_SPI if SPI_MASTER

comment "SPI and I2C RTC drivers"

config RTC_DRV_DS3232
	tristate "Dallas/Maxim DS3232/DS3234"
	depends on RTC_I2C_AND_SPI
	select REGMAP_I2C if I2C
	select REGMAP_SPI if SPI_MASTER
	help
	  If you say yes here you get support for Dallas Semiconductor
	  DS3232 and DS3234 real-time clock chips. If an interrupt is associated
@@ -876,6 +880,8 @@ config RTC_DRV_DS3232_HWMON
config RTC_DRV_PCF2127
	tristate "NXP PCF2127"
	depends on RTC_I2C_AND_SPI
	select REGMAP_I2C if I2C
	select REGMAP_SPI if SPI_MASTER
	select WATCHDOG_CORE if WATCHDOG
	help
	  If you say yes here you get support for the NXP PCF2127/29 RTC
@@ -892,6 +898,8 @@ config RTC_DRV_PCF2127
config RTC_DRV_RV3029C2
	tristate "Micro Crystal RV3029/3049"
	depends on RTC_I2C_AND_SPI
	select REGMAP_I2C if I2C
	select REGMAP_SPI if SPI_MASTER
	help
	  If you say yes here you get support for the Micro Crystal
	  RV3029 and RV3049 RTC chips.
Loading