Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1917615 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull RTC updates from Alexandre Belloni:
 "Core:
   - use is_visible() to control sysfs attributes
   - switch wakealarm attribute to DEVICE_ATTR_RW
   - make rtc_does_wakealarm() return boolean
   - properly manage lifetime of dev and cdev in rtc device
   - remove unnecessary device_get() in rtc_device_unregister
   - fix double free in rtc_register_device() error path

  New drivers:
   - NXP LPC24xx
   - Xilinx Zynq MP
   - Dialog DA9062

  Subsystem wide cleanups:
   - fix drivers that consider 0 as a valid IRQ in client->irq
   - Drop (un)likely before IS_ERR(_OR_NULL)
   - drop the remaining owner assignment for i2c_driver and
     platform_driver
   - module autoload fixes

  Drivers:
   - 88pm80x: add device tree support
   - abx80x: fix RTC write bit
   - ab8500: Add a sentinel to ab85xx_rtc_ids[]
   - armada38x: Align RTC set time procedure with the official errata
   - as3722: correct month value
   - at91sam9: cleanups
   - at91rm9200: get and use slow clock and cleanups
   - bq32k: remove redundant check
   - cmos: century support, proper fix for the spurious wakeup
   - ds1307: cleanups and wakeup irq support
   - ds1374: Remove unused variable
   - ds1685: Use module_platform_driver
   - ds3232: fix WARNING trace in resume function
   - gemini: fix ptr_ret.cocci warnings
   - mt6397: implement suspend/resume
   - omap: support internal and external clock enabling
   - opal: Enable alarms only when opal supports tpo
   - pcf2127: use OFS flag to detect unreliable date and warn the user
   - pl031: fix typo for author email
   - rx8025: huge cleanup and fixes
   - sa1100/pxa: share common code
   - s5m: fix to update ctrl register
   - s3c: fix clocks and wakeup, cleanup
   - sirfsoc: use regmap
   - nvram_read()/nvram_write() functions for cmos, ds1305, ds1307,
     ds1343, ds1511, ds1553, ds1742, m48t59, rp5c01, stk17ta8, tx4939
   - use rtc_valid_tm() error code when reading date/time instead of 0
     for isl12022, pcf2123, pcf2127"

* tag 'rtc-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (90 commits)
  rtc: abx80x: fix RTC write bit
  rtc: ab8500: Add a sentinel to ab85xx_rtc_ids[]
  rtc: ds1374: Remove unused variable
  rtc: Fix module autoload for OF platform drivers
  rtc: Fix module autoload for rtc-{ab8500,max8997,s5m} drivers
  rtc: omap: Add external clock enabling support
  rtc: omap: Add internal clock enabling support
  ARM: dts: AM437x: Add the internal and external clock nodes for rtc
  rtc: s5m: fix to update ctrl register
  rtc: add xilinx zynqmp rtc driver
  devicetree: bindings: rtc: add bindings for xilinx zynqmp rtc
  rtc: as3722: correct month value
  ARM: config: Switch PXA27x platforms to use PXA RTC driver
  ARM: mmp: remove unused RTC register definitions
  ARM: sa1100: remove unused RTC register definitions
  rtc: sa1100/pxa: convert to run-time register mapping
  ARM: pxa: add memory resource to SA1100 RTC device
  rtc: pxa: convert to use shared sa1100 functions
  rtc: sa1100: prepare to share sa1100_rtc_ops
  rtc: ds3232: fix WARNING trace in resume function
  ...
parents 12f03ee6 5f1b2f77
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
NXP LPC1788 real-time clock

The LPC1788 RTC provides calendar and clock functionality
together with periodic tick and alarm interrupt support.

Required properties:
- compatible	: must contain "nxp,lpc1788-rtc"
- reg		: Specifies base physical address and size of the registers.
- interrupts	: A single interrupt specifier.
- clocks	: Must contain clock specifiers for rtc and register clock
- clock-names	: Must contain "rtc" and "reg"
  See ../clocks/clock-bindings.txt for details.

Example:
rtc: rtc@40046000 {
	compatible = "nxp,lpc1788-rtc";
	reg = <0x40046000 0x1000>;
	interrupts = <47>;
	clocks = <&creg_clk 0>, <&ccu1 CLK_CPU_BUS>;
	clock-names = "rtc", "reg";
};
+4 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@ Required properties:
Optional properties:
- system-power-controller: whether the rtc is controlling the system power
  through pmic_power_en
- clocks: Any internal or external clocks feeding in to rtc
- clock-names: Corresponding names of the clocks

Example:

@@ -26,4 +28,6 @@ rtc@1c23000 {
		      19>;
	interrupt-parent = <&intc>;
	system-power-controller;
	clocks = <&clk_32k_rtc>, <&clk_32768_ck>;
	clock-names = "ext-clk", "int-clk";
};
+25 −0
Original line number Diff line number Diff line
* Xilinx Zynq Ultrascale+ MPSoC Real Time Clock

RTC controller for the Xilinx Zynq MPSoC Real Time Clock
Separate IRQ lines for seconds and alarm

Required properties:
- compatible: Should be "xlnx,zynqmp-rtc"
- reg: Physical base address of the controller and length
       of memory mapped region.
- interrupts: IRQ lines for the RTC.
- interrupt-names: interrupt line names eg. "sec" "alarm"

Optional:
- calibration: calibration value for 1 sec period which will
		be programmed directly to calibration register

Example:
rtc: rtc@ffa60000 {
	compatible = "xlnx,zynqmp-rtc";
	reg = <0x0 0xffa60000 0x100>;
	interrupt-parent = <&gic>;
	interrupts = <0 26 4>, <0 27 4>;
	interrupt-names = "alarm", "sec";
	calibration = <0x198233>;
};
+2 −0
Original line number Diff line number Diff line
@@ -358,6 +358,8 @@
			interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH
				      GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
			ti,hwmods = "rtc";
			clocks = <&clk_32768_ck>;
			clock-names = "int-clk";
			status = "disabled";
		};

+13 −0
Original line number Diff line number Diff line
@@ -112,6 +112,13 @@
		clock-frequency = <12000000>;
	};

	/* fixed 32k external oscillator clock */
	clk_32k_rtc: clk_32k_rtc {
		#clock-cells = <0>;
		compatible = "fixed-clock";
		clock-frequency = <32768>;
	};

	sound0: sound@0 {
		compatible = "simple-audio-card";
		simple-audio-card,name = "AM437x-GP-EVM";
@@ -941,3 +948,9 @@
	tx-num-evt = <32>;
	rx-num-evt = <32>;
};

&rtc {
	clocks = <&clk_32k_rtc>, <&clk_32768_ck>;
	clock-names = "ext-clk", "int-clk";
	status = "okay";
};
Loading