Skip to contentSkip to conversation

rtc: max77686: convert to i2c_new_ancillary_device

PATCH Applied Svyatoslav Ryhel 5 participants 17 messages Mar 12 – Mar 19

Subsystems (8)

v4 of 5 Applied Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v4 cover rtc: max77686: convert to i2c_new_ancillary_device

Convert RTC I2C device creation from devm_i2c_new_dummy_device() to i2c_new_ancillary_device() to enable the use of a device tree-specified RTC address instead of a hardcoded value. If the device tree does not provide an address, use hardcoded values as a fallback.

This addresses an issue with the MAX77663 PMIC, which can have the RTC at different I2C positions (either 0x48, like the MAX77714, or 0x68, like the MAX77620). The MAX77620 value is used as the default. The I2C position of the MAX77663 is factory-set and cannot be detected from the chip itself.

I have tested this patch on LG Optimus Vu P895 with max77663 PMIC and non-default RTC position. RTC is registered correctly.

---
Changes in v4
- adjusted pinconfig node naming
- changed interrupt in the example
- fixed indentation in the example
- corrected pinconfig node name in the example
- commit "dt-bindings: gpio: trivial-gpio: remove max77620 compatible" squashed with the converting patch for this compatible

Changes in v3
- max77620 files converted to DT schema.

Changes in v2
- dropped patch that changes max77686 and adjusted max77620 where max77663 is described.
---

Svyatoslav Ryhel (5):
regulator: dt-bindings: regulator-max77620: convert to DT schema
dt-bindings: pinctrl: pinctrl-max77620: convert to DT schema
dt-bindings: mfd: max77620: convert to DT schema
dt-bindings: mfd: max77620: document optional RTC address for MAX77663
rtc: max77686: convert to i2c_new_ancillary_device

 .../bindings/gpio/trivial-gpio.yaml           |   2 -
 .../devicetree/bindings/mfd/max77620.txt      | 162 -------
 .../bindings/mfd/maxim,max77620.yaml          | 444 ++++++++++++++++++
 .../pinctrl/maxim,max77620-pinctrl.yaml       |  97 ++++
 .../bindings/pinctrl/pinctrl-max77620.txt     | 127 -----
 .../regulator/maxim,max77620-regulator.yaml   |  99 ++++
 .../bindings/regulator/regulator-max77620.txt | 222 ---------
 .../bindings/thermal/max77620_thermal.txt     |  70 ---
 drivers/rtc/rtc-max77686.c                    |  14 +-
 9 files changed, 652 insertions(+), 585 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/max77620.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/maxim,max77620.yaml
 create mode 100644 Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml
 delete mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-max77620.txt
 create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max77620-regulator.yaml
 delete mode 100644 Documentation/devicetree/bindings/regulator/regulator-max77620.txt
 delete mode 100644 Documentation/devicetree/bindings/thermal/max77620_thermal.txt
Signature · 1 line
2.51.0
#1 lore raw

PATCH v4 1/5 regulator: dt-bindings: regulator-max77620: convert to DT schema

Convert regulator-max77620 devicetree bindings for the MAX77620 PMIC from TXT to YAML format. This patch does not change any functionality; the bindings remain the same.

---
 .../regulator/maxim,max77620-regulator.yaml   |  99 ++++++++
 .../bindings/regulator/regulator-max77620.txt | 222 ------------------
 2 files changed, 99 insertions(+), 222 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max77620-regulator.yaml
 delete mode 100644 Documentation/devicetree/bindings/regulator/regulator-max77620.txt
Documentation/devicetree/bindings/regulator/maxim,max77620-regulator.yaml new file +99 -0
new file mode 100644
index 000000000000..7118c34961ba
@@ -0,0 +1,99 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/maxim,max77620-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Regulator for MAX77620 Power management IC from Maxim Semiconductor.
+
+maintainers:
+  - Svyatoslav Ryhel <[email protected]>
+
+description:
+  Device has multiple DCDC(sd[0-3]) and LDOs(ldo[0-8]). The input supply
+  of these regulators are defined under parent device node. Details of
+  regulator properties are defined as child node under sub-node "regulators"
+  which is child node of device node.
+
+patternProperties:
+  "^in-(sd[0-3]|ldo(0-1|2|3-5|4-6|7-8))-supply$":
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: Input supply for DCDC or LDO
+
+  "^(sd[0-3]|ldo[0-8])$":
+    type: object
+    $ref: /schemas/regulator/regulator.yaml#
+    unevaluatedProperties: false
+
+    properties:
+      maxim,active-fps-source:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: |
+          FPS source for the GPIOs to get enabled/disabled when system is in
+          active state. Valid values are:
+          - MAX77620_FPS_SRC_0: FPS source is FPS0.
+          - MAX77620_FPS_SRC_1: FPS source is FPS1
+          - MAX77620_FPS_SRC_2: FPS source is FPS2
+          - MAX77620_FPS_SRC_NONE: GPIO is not controlled by FPS events and
+                                   it gets enabled/disabled by register access.
+          Absence of this property will leave the FPS configuration register
+          for that GPIO to default configuration.
+
+      maxim,active-fps-power-up-slot:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          Sequencing event slot number on which the GPIO get enabled when
+          master FPS input event set to HIGH. This is applicable if FPS source
+          is selected as FPS0, FPS1 or FPS2.
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+      maxim,active-fps-power-down-slot:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          Sequencing event slot number on which the GPIO get disabled when
+          master FPS input event set to LOW. This is applicable if FPS source
+          is selected as FPS0, FPS1 or FPS2.
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+      maxim,suspend-fps-source:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          This is same as property "maxim,active-fps-source" but value get
+          configured when system enters in to suspend state.
+
+      maxim,suspend-fps-power-up-slot:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          This is same as property "maxim,active-fps-power-up-slot" but this
+          value get configured into FPS configuration register when system
+          enters into suspend. This is applicable if suspend state FPS source
+          is selected as FPS0, FPS1 or FPS2.
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+      maxim,suspend-fps-power-down-slot:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          This is same as property "maxim,active-fps-power-down-slot" but this
+          value get configured into FPS configuration register when system
+          enters into suspend. This is applicable if suspend state FPS source
+          is selected as FPS0, FPS1 or FPS2.
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+      maxim,ramp-rate-setting:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: |
+          Ramp rate(uV/us) setting to be configured to the device. The platform
+          may have different ramp rate than advertised ramp rate if it has design
+          variation from Maxim's recommended. On this case, platform specific
+          ramp rate is used for ramp time calculation and this property is used
+          for device register configurations. The measured ramp rate of platform
+          is provided by the regulator-ramp-delay.
+
+          Maxim Max77620 supports following ramp delay:
+            SD: 13.75mV/us, 27.5mV/us, 55mV/us
+            LDOs: 5mV/us, 100mV/us
+        enum: [5000, 13750, 27500, 55000, 100000]
+
+additionalProperties: false
+
+# see maxim,max77620.yaml for an example
Documentation/devicetree/bindings/regulator/regulator-max77620.txt deleted +0 -222

222 lines not on this page · raw message

Signature · 1 line
2.51.0
maintainer Reviewed-by on v4 1/5
#2 lore raw

Re: [PATCH v4 1/5] regulator: dt-bindings: regulator-max77620: convert to DT schema

Quoted 4 lines · Svyatoslav Ryhel

Convert regulator-max77620 devicetree bindings for the MAX77620 PMIC from TXT to YAML format. This patch does not change any functionality; the bindings remain the same.

Quoted 9 lines
---
 .../regulator/maxim,max77620-regulator.yaml   |  99 ++++++++
 .../bindings/regulator/regulator-max77620.txt | 222 ------------------
 2 files changed, 99 insertions(+), 222 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max77620-regulator.yaml
 delete mode 100644 Documentation/devicetree/bindings/regulator/regulator-max77620.txt
#3 lore raw

PATCH v4 2/5 dt-bindings: pinctrl: pinctrl-max77620: convert to DT schema

In reply to Svyatoslav Ryhel

Convert pinctrl-max77620 devicetree bindings for the MAX77620 PMIC from TXT to YAML format. This patch does not change any functionality; the bindings remain the same.

---
 .../pinctrl/maxim,max77620-pinctrl.yaml       |  97 +++++++++++++
 .../bindings/pinctrl/pinctrl-max77620.txt     | 127 ------------------
 2 files changed, 97 insertions(+), 127 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml
 delete mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-max77620.txt
Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml new file +97 -0
new file mode 100644
index 000000000000..4e5f997317ca
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/maxim,max77620-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Pinmux controller function for Maxim MAX77620 Power management IC
+
+maintainers:
+  - Svyatoslav Ryhel <[email protected]>
+
+description:
+  Device has 8 GPIO pins which can be configured as GPIO as well as the
+  special IO functions.
+
+allOf:
+  - $ref: /schemas/pinctrl/pincfg-node.yaml
+  - $ref: /schemas/pinctrl/pinmux-node.yaml
+
+patternProperties:
+  "^(pin|gpio).":
+    type: object
+
+    properties:
+      pins:
+        items:
+          enum: [ gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7 ]
+
+      function:
+        items:
+          enum: [ gpio, lpm-control-in, fps-out, 32k-out1, sd0-dvs-in, sd1-dvs-in,
+                  reference-out ]
+
+      drive-push-pull: true
+      drive-open-drain: true
+      bias-pull-up: true
+      bias-pull-down: true
+
+      maxim,active-fps-source:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: |
+          FPS source for the GPIOs to get enabled/disabled when system is in
+          active state. Valid values are:
+          - MAX77620_FPS_SRC_0: FPS source is FPS0.
+          - MAX77620_FPS_SRC_1: FPS source is FPS1
+          - MAX77620_FPS_SRC_2: FPS source is FPS2
+          - MAX77620_FPS_SRC_NONE: GPIO is not controlled by FPS events and
+                                   it gets enabled/disabled by register access.
+          Absence of this property will leave the FPS configuration register
+          for that GPIO to default configuration.
+
+      maxim,active-fps-power-up-slot:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          Sequencing event slot number on which the GPIO get enabled when
+          master FPS input event set to HIGH. This is applicable if FPS source
+          is selected as FPS0, FPS1 or FPS2.
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+      maxim,active-fps-power-down-slot:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          Sequencing event slot number on which the GPIO get disabled when
+          master FPS input event set to LOW. This is applicable if FPS source
+          is selected as FPS0, FPS1 or FPS2.
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+      maxim,suspend-fps-source:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          This is same as property "maxim,active-fps-source" but value get
+          configured when system enters in to suspend state.
+
+      maxim,suspend-fps-power-up-slot:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          This is same as property "maxim,active-fps-power-up-slot" but this
+          value get configured into FPS configuration register when system
+          enters into suspend. This is applicable if suspend state FPS source
+          is selected as FPS0, FPS1 or FPS2.
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+      maxim,suspend-fps-power-down-slot:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          This is same as property "maxim,active-fps-power-down-slot" but this
+          value get configured into FPS configuration register when system
+          enters into suspend. This is applicable if suspend state FPS source
+          is selected as FPS0, FPS1 or FPS2.
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+    required:
+      - pins
+
+additionalProperties: false
+
+# see maxim,max77620.yaml for an example
Documentation/devicetree/bindings/pinctrl/pinctrl-max77620.txt deleted +0 -127

127 lines not on this page · raw message

Signature · 1 line
2.51.0
maintainer
#4 lore raw

Re: [PATCH v4 2/5] dt-bindings: pinctrl: pinctrl-max77620: convert to DT schema

Quoted 26 lines · Svyatoslav Ryhel

Convert pinctrl-max77620 devicetree bindings for the MAX77620 PMIC from TXT to YAML format. This patch does not change any functionality; the bindings remain the same.

---
 .../pinctrl/maxim,max77620-pinctrl.yaml       |  97 +++++++++++++
 .../bindings/pinctrl/pinctrl-max77620.txt     | 127 ------------------
 2 files changed, 97 insertions(+), 127 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml
 delete mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-max77620.txt
Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml new file +8 -0
new file mode 100644
index 000000000000..4e5f997317ca
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/maxim,max77620-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Pinmux controller function for Maxim MAX77620 Power management IC
+

Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml line 18

Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml new file +10 -0
+maintainers:
+  - Svyatoslav Ryhel <[email protected]>
+
+description:
+  Device has 8 GPIO pins which can be configured as GPIO as well as the
+  special IO functions.
+
+allOf:
+  - $ref: /schemas/pinctrl/pincfg-node.yaml
+  - $ref: /schemas/pinctrl/pinmux-node.yaml

Don't these properties apply to the child nodes?

Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml line 22

Quoted 4 lines
Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml new file +4 -0
+
+patternProperties:
+  "^(pin|gpio).":
+    type: object

additionalProperties: false

Or unevaluatedProperties with the $refs moved here.

Quoted 211 lines
Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml new file +75 -0
+
+    properties:
+      pins:
+        items:
+          enum: [ gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7 ]
+
+      function:
+        items:
+          enum: [ gpio, lpm-control-in, fps-out, 32k-out1, sd0-dvs-in, sd1-dvs-in,
+                  reference-out ]
+
+      drive-push-pull: true
+      drive-open-drain: true
+      bias-pull-up: true
+      bias-pull-down: true
+
+      maxim,active-fps-source:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: |
+          FPS source for the GPIOs to get enabled/disabled when system is in
+          active state. Valid values are:
+          - MAX77620_FPS_SRC_0: FPS source is FPS0.
+          - MAX77620_FPS_SRC_1: FPS source is FPS1
+          - MAX77620_FPS_SRC_2: FPS source is FPS2
+          - MAX77620_FPS_SRC_NONE: GPIO is not controlled by FPS events and
+                                   it gets enabled/disabled by register access.
+          Absence of this property will leave the FPS configuration register
+          for that GPIO to default configuration.
+
+      maxim,active-fps-power-up-slot:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          Sequencing event slot number on which the GPIO get enabled when
+          master FPS input event set to HIGH. This is applicable if FPS source
+          is selected as FPS0, FPS1 or FPS2.
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+      maxim,active-fps-power-down-slot:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          Sequencing event slot number on which the GPIO get disabled when
+          master FPS input event set to LOW. This is applicable if FPS source
+          is selected as FPS0, FPS1 or FPS2.
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+      maxim,suspend-fps-source:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          This is same as property "maxim,active-fps-source" but value get
+          configured when system enters in to suspend state.
+
+      maxim,suspend-fps-power-up-slot:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          This is same as property "maxim,active-fps-power-up-slot" but this
+          value get configured into FPS configuration register when system
+          enters into suspend. This is applicable if suspend state FPS source
+          is selected as FPS0, FPS1 or FPS2.
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+      maxim,suspend-fps-power-down-slot:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          This is same as property "maxim,active-fps-power-down-slot" but this
+          value get configured into FPS configuration register when system
+          enters into suspend. This is applicable if suspend state FPS source
+          is selected as FPS0, FPS1 or FPS2.
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+    required:
+      - pins
+
+additionalProperties: false
+
+# see maxim,max77620.yaml for an example
Documentation/devicetree/bindings/pinctrl/pinctrl-max77620.txt deleted +0 -127
deleted file mode 100644
index 28fbca180068..000000000000
@@ -1,127 +0,0 @@
-Pincontrol driver for MAX77620 Power management IC from Maxim Semiconductor.
-
-Device has 8 GPIO pins which can be configured as GPIO as well as the
-special IO functions.
-
-Please refer file <devicetree/bindings/pinctrl/pinctrl-bindings.txt>
-for details of the common pinctrl bindings used by client devices,
-including the meaning of the phrase "pin configuration node".
-
-Optional Pinmux properties:
---------------------------
-Following properties are required if default setting of pins are required
-at boot.
-- pinctrl-names: A pinctrl state named per <pinctrl-bindings.txt>.
-- pinctrl[0...n]: Properties to contain the phandle for pinctrl states per
-		<pinctrl-bindings.txt>.
-
-The pin configurations are defined as child of the pinctrl states node. Each
-sub-node have following properties:
-
-Required properties:
-------------------
-- pins: List of pins. Valid values of pins properties are:
-		      gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7.
-
-Optional properties:
--------------------
-Following are optional properties defined as pinmux DT binding document
-<pinctrl-bindings.txt>. Absence of properties will leave the configuration
-on default.
-	function,
-	drive-push-pull,
-	drive-open-drain,
-	bias-pull-up,
-	bias-pull-down.
-
-Valid values for function properties are:
-	gpio, lpm-control-in, fps-out, 32k-out, sd0-dvs-in, sd1-dvs-in,
-	reference-out
-
-There are also customised properties for the GPIO1, GPIO2 and GPIO3. These
-customised properties are required to configure FPS configuration parameters
-of these GPIOs. Please refer <devicetree/bindings/mfd/max77620.txt> for more
-detail of Flexible Power Sequence (FPS).
-
-- maxim,active-fps-source:		FPS source for the GPIOs to get
-					enabled/disabled when system is in
-					active state.  Valid values are:
-					- MAX77620_FPS_SRC_0,
-						FPS source is FPS0.
-					- MAX77620_FPS_SRC_1,
-						FPS source is FPS1
-					- MAX77620_FPS_SRC_2 and
-						FPS source is FPS2
-					- MAX77620_FPS_SRC_NONE.
-						GPIO is not controlled
-						by FPS events and it gets
-						enabled/disabled by register
-						access.
-					Absence of this property will leave
-					the FPS configuration register for that
-					GPIO to default configuration.
-
-- maxim,active-fps-power-up-slot:	Sequencing event slot number on which
-					the GPIO get enabled when
-					master FPS input event set to HIGH.
-					Valid values are 0 to 7.
-					This is applicable if FPS source is
-					selected as FPS0, FPS1 or FPS2.
-
-- maxim,active-fps-power-down-slot:	Sequencing event slot number on which
-					the GPIO get disabled when master
-					FPS input event set to LOW.
-					Valid values are 0 to 7.
-					This is applicable if FPS source is
-					selected as FPS0, FPS1 or FPS2.
-
-- maxim,suspend-fps-source:		This is same as property
-					"maxim,active-fps-source" but value
-					get configured when system enters in
-					to suspend state.
-
-- maxim,suspend-fps-power-up-slot:	This is same as property
-					"maxim,active-fps-power-up-slot" but
-					this value get configured into FPS
-					configuration register when system
-					enters into suspend.
-					This is applicable if suspend state
-					FPS source is selected as FPS0, FPS1 or
-
-- maxim,suspend-fps-power-down-slot:	This is same as property
-					"maxim,active-fps-power-down-slot" but
-					this value get configured into FPS
-					configuration register when system
-					enters into suspend.
-					This is applicable if suspend state
-					FPS source is selected as FPS0, FPS1 or
-					FPS2.
-
-Example:
---------
-#include <dt-bindings/mfd/max77620.h>
-...
-max77620@3c {
-
-	pinctrl-names = "default";
-	pinctrl-0 = <&spmic_default>;
-
-	spmic_default: pinmux@0 {
-		pin_gpio0 {
-			pins = "gpio0";
-			function = "gpio";
-		};
-
-		pin_gpio1 {
-			pins = "gpio1";
-			function = "fps-out";
-			maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
-		};
-
-		pin_gpio2 {
-			pins = "gpio2";
-			function = "fps-out";
-			maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
-		};
-	};
-};
Signature · 1 line
2.51.0
#5 lore raw

Re: [PATCH v4 2/5] dt-bindings: pinctrl: pinctrl-max77620: convert to DT schema

чт, 12 бер. 2026 р. о 17:20 Rob Herring <[email protected]> пише:

Quoted 32 lines · Svyatoslav Ryhel
Quoted 30 lines

Convert pinctrl-max77620 devicetree bindings for the MAX77620 PMIC from TXT to YAML format. This patch does not change any functionality; the bindings remain the same.

---
 .../pinctrl/maxim,max77620-pinctrl.yaml       |  97 +++++++++++++
 .../bindings/pinctrl/pinctrl-max77620.txt     | 127 ------------------
 2 files changed, 97 insertions(+), 127 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml
 delete mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-max77620.txt
Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml new file +12 -0
new file mode 100644
index 000000000000..4e5f997317ca
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/maxim,max77620-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Pinmux controller function for Maxim MAX77620 Power management IC
+
+maintainers:
+  - Svyatoslav Ryhel <[email protected]>
+
+description:
Quoted 9 lines

Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml line 18

Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml new file +6 -0
+  Device has 8 GPIO pins which can be configured as GPIO as well as the
+  special IO functions.
+
+allOf:
+  - $ref: /schemas/pinctrl/pincfg-node.yaml
+  - $ref: /schemas/pinctrl/pinmux-node.yaml

Don't these properties apply to the child nodes?

They do, but not all properties defined in those schema files are applicable for this binding. I have marked those which can be applied in the node patterns.

Quoted 6 lines

Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml line 22

Quoted 4 lines
Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml new file +4 -0
+
+patternProperties:
+  "^(pin|gpio).":
+    type: object

additionalProperties: false

I will move additionalProperties here then.

Quoted 214 lines

Or unevaluatedProperties with the $refs moved here.

Quoted 211 lines
Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml new file +75 -0
+
+    properties:
+      pins:
+        items:
+          enum: [ gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7 ]
+
+      function:
+        items:
+          enum: [ gpio, lpm-control-in, fps-out, 32k-out1, sd0-dvs-in, sd1-dvs-in,
+                  reference-out ]
+
+      drive-push-pull: true
+      drive-open-drain: true
+      bias-pull-up: true
+      bias-pull-down: true
+
+      maxim,active-fps-source:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: |
+          FPS source for the GPIOs to get enabled/disabled when system is in
+          active state. Valid values are:
+          - MAX77620_FPS_SRC_0: FPS source is FPS0.
+          - MAX77620_FPS_SRC_1: FPS source is FPS1
+          - MAX77620_FPS_SRC_2: FPS source is FPS2
+          - MAX77620_FPS_SRC_NONE: GPIO is not controlled by FPS events and
+                                   it gets enabled/disabled by register access.
+          Absence of this property will leave the FPS configuration register
+          for that GPIO to default configuration.
+
+      maxim,active-fps-power-up-slot:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          Sequencing event slot number on which the GPIO get enabled when
+          master FPS input event set to HIGH. This is applicable if FPS source
+          is selected as FPS0, FPS1 or FPS2.
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+      maxim,active-fps-power-down-slot:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          Sequencing event slot number on which the GPIO get disabled when
+          master FPS input event set to LOW. This is applicable if FPS source
+          is selected as FPS0, FPS1 or FPS2.
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+      maxim,suspend-fps-source:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          This is same as property "maxim,active-fps-source" but value get
+          configured when system enters in to suspend state.
+
+      maxim,suspend-fps-power-up-slot:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          This is same as property "maxim,active-fps-power-up-slot" but this
+          value get configured into FPS configuration register when system
+          enters into suspend. This is applicable if suspend state FPS source
+          is selected as FPS0, FPS1 or FPS2.
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+      maxim,suspend-fps-power-down-slot:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          This is same as property "maxim,active-fps-power-down-slot" but this
+          value get configured into FPS configuration register when system
+          enters into suspend. This is applicable if suspend state FPS source
+          is selected as FPS0, FPS1 or FPS2.
+        enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+    required:
+      - pins
+
+additionalProperties: false
+
+# see maxim,max77620.yaml for an example
Documentation/devicetree/bindings/pinctrl/pinctrl-max77620.txt deleted +0 -128
deleted file mode 100644
index 28fbca180068..000000000000
@@ -1,127 +0,0 @@
-Pincontrol driver for MAX77620 Power management IC from Maxim Semiconductor.
-
-Device has 8 GPIO pins which can be configured as GPIO as well as the
-special IO functions.
-
-Please refer file <devicetree/bindings/pinctrl/pinctrl-bindings.txt>
-for details of the common pinctrl bindings used by client devices,
-including the meaning of the phrase "pin configuration node".
-
-Optional Pinmux properties:
---------------------------
-Following properties are required if default setting of pins are required
-at boot.
-- pinctrl-names: A pinctrl state named per <pinctrl-bindings.txt>.
-- pinctrl[0...n]: Properties to contain the phandle for pinctrl states per
-             <pinctrl-bindings.txt>.
-
-The pin configurations are defined as child of the pinctrl states node. Each
-sub-node have following properties:
-
-Required properties:
-------------------
-- pins: List of pins. Valid values of pins properties are:
-                   gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7.
-
-Optional properties:
--------------------
-Following are optional properties defined as pinmux DT binding document
-<pinctrl-bindings.txt>. Absence of properties will leave the configuration
-on default.
-     function,
-     drive-push-pull,
-     drive-open-drain,
-     bias-pull-up,
-     bias-pull-down.
-
-Valid values for function properties are:
-     gpio, lpm-control-in, fps-out, 32k-out, sd0-dvs-in, sd1-dvs-in,
-     reference-out
-
-There are also customised properties for the GPIO1, GPIO2 and GPIO3. These
-customised properties are required to configure FPS configuration parameters
-of these GPIOs. Please refer <devicetree/bindings/mfd/max77620.txt> for more
-detail of Flexible Power Sequence (FPS).
-
-- maxim,active-fps-source:           FPS source for the GPIOs to get
-                                     enabled/disabled when system is in
-                                     active state.  Valid values are:
-                                     - MAX77620_FPS_SRC_0,
-                                             FPS source is FPS0.
-                                     - MAX77620_FPS_SRC_1,
-                                             FPS source is FPS1
-                                     - MAX77620_FPS_SRC_2 and
-                                             FPS source is FPS2
-                                     - MAX77620_FPS_SRC_NONE.
-                                             GPIO is not controlled
-                                             by FPS events and it gets
-                                             enabled/disabled by register
-                                             access.
-                                     Absence of this property will leave
-                                     the FPS configuration register for that
-                                     GPIO to default configuration.
-
-- maxim,active-fps-power-up-slot:    Sequencing event slot number on which
-                                     the GPIO get enabled when
-                                     master FPS input event set to HIGH.
-                                     Valid values are 0 to 7.
-                                     This is applicable if FPS source is
-                                     selected as FPS0, FPS1 or FPS2.
-
-- maxim,active-fps-power-down-slot:  Sequencing event slot number on which
-                                     the GPIO get disabled when master
-                                     FPS input event set to LOW.
-                                     Valid values are 0 to 7.
-                                     This is applicable if FPS source is
-                                     selected as FPS0, FPS1 or FPS2.
-
-- maxim,suspend-fps-source:          This is same as property
-                                     "maxim,active-fps-source" but value
-                                     get configured when system enters in
-                                     to suspend state.
-
-- maxim,suspend-fps-power-up-slot:   This is same as property
-                                     "maxim,active-fps-power-up-slot" but
-                                     this value get configured into FPS
-                                     configuration register when system
-                                     enters into suspend.
-                                     This is applicable if suspend state
-                                     FPS source is selected as FPS0, FPS1 or
-
-- maxim,suspend-fps-power-down-slot: This is same as property
-                                     "maxim,active-fps-power-down-slot" but
-                                     this value get configured into FPS
-                                     configuration register when system
-                                     enters into suspend.
-                                     This is applicable if suspend state
-                                     FPS source is selected as FPS0, FPS1 or
-                                     FPS2.
-
-Example:
---------
-#include <dt-bindings/mfd/max77620.h>
-...
-max77620@3c {
-
-     pinctrl-names = "default";
-     pinctrl-0 = <&spmic_default>;
-
-     spmic_default: pinmux@0 {
-             pin_gpio0 {
-                     pins = "gpio0";
-                     function = "gpio";
-             };
-
-             pin_gpio1 {
-                     pins = "gpio1";
-                     function = "fps-out";
-                     maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
-             };
-
-             pin_gpio2 {
-                     pins = "gpio2";
-                     function = "fps-out";
-                     maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
-             };
-     };
-};
--

2.51.0

maintainer
#6 lore raw

Re: [PATCH v4 2/5] dt-bindings: pinctrl: pinctrl-max77620: convert to DT schema

Quoted 44 lines · Svyatoslav Ryhel

чт, 12 бер. 2026 р. о 17:20 Rob Herring <[email protected]> пише:

Quoted 32 lines · Svyatoslav Ryhel
Quoted 30 lines

Convert pinctrl-max77620 devicetree bindings for the MAX77620 PMIC from TXT to YAML format. This patch does not change any functionality; the bindings remain the same.

---
 .../pinctrl/maxim,max77620-pinctrl.yaml       |  97 +++++++++++++
 .../bindings/pinctrl/pinctrl-max77620.txt     | 127 ------------------
 2 files changed, 97 insertions(+), 127 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml
 delete mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-max77620.txt
Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml new file +12 -0
new file mode 100644
index 000000000000..4e5f997317ca
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/maxim,max77620-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Pinmux controller function for Maxim MAX77620 Power management IC
+
+maintainers:
+  - Svyatoslav Ryhel <[email protected]>
+
+description:
Quoted 9 lines

Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml line 18

Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml new file +6 -0
+  Device has 8 GPIO pins which can be configured as GPIO as well as the
+  special IO functions.
+
+allOf:
+  - $ref: /schemas/pinctrl/pincfg-node.yaml
+  - $ref: /schemas/pinctrl/pinmux-node.yaml

Don't these properties apply to the child nodes?

Quoted 3 lines

They do, but not all properties defined in those schema files are applicable for this binding. I have marked those which can be applied in the node patterns.

Then additionalProperties is appropriate.

Quoted 8 lines
Quoted 6 lines

Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml line 22

Quoted 4 lines
Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml new file +4 -0
+
+patternProperties:
+  "^(pin|gpio).":
+    type: object

additionalProperties: false

I will move additionalProperties here then.

No, moving it is wrong. You need it here AND in the parent node.

Rob

#7 lore raw

Re: [PATCH v4 2/5] dt-bindings: pinctrl: pinctrl-max77620: convert to DT schema

чт, 12 бер. 2026 р. о 17:39 Rob Herring <[email protected]> пише:

Quoted 59 lines · Svyatoslav Ryhel
Quoted 44 lines

чт, 12 бер. 2026 р. о 17:20 Rob Herring <[email protected]> пише:

Quoted 32 lines · Svyatoslav Ryhel
Quoted 30 lines

Convert pinctrl-max77620 devicetree bindings for the MAX77620 PMIC from TXT to YAML format. This patch does not change any functionality; the bindings remain the same.

---
 .../pinctrl/maxim,max77620-pinctrl.yaml       |  97 +++++++++++++
 .../bindings/pinctrl/pinctrl-max77620.txt     | 127 ------------------
 2 files changed, 97 insertions(+), 127 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml
 delete mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-max77620.txt
Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml new file +12 -0
new file mode 100644
index 000000000000..4e5f997317ca
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/maxim,max77620-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Pinmux controller function for Maxim MAX77620 Power management IC
+
+maintainers:
+  - Svyatoslav Ryhel <[email protected]>
+
+description:
Quoted 9 lines

Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml line 18

Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml new file +6 -0
+  Device has 8 GPIO pins which can be configured as GPIO as well as the
+  special IO functions.
+
+allOf:
+  - $ref: /schemas/pinctrl/pincfg-node.yaml
+  - $ref: /schemas/pinctrl/pinmux-node.yaml

Don't these properties apply to the child nodes?

Quoted 3 lines

They do, but not all properties defined in those schema files are applicable for this binding. I have marked those which can be applied in the node patterns.

Then additionalProperties is appropriate.

Quoted 7 lines
Quoted 6 lines

Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml line 22

Quoted 4 lines
Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml new file +4 -0
+
+patternProperties:
+  "^(pin|gpio).":
+    type: object

additionalProperties: false

Quoted 4 lines
Quoted 1 line

I will move additionalProperties here then.

No, moving it is wrong. You need it here AND in the parent node.

Oh, yes, you are right, it seems that I did not notice while converting from txt. Thanks!

Quoted 1 line

Rob

#8 lore raw

PATCH v4 3/5 dt-bindings: mfd: max77620: convert to DT schema

In reply to Svyatoslav Ryhel

Convert max77620 devicetree bindings from TXT to YAML format. This patch does not change any functionality; the bindings remain the same. The thermal bindings are incorporated into the binding. GPIO controller function in MAX77620 has no dedicated node and is folded into the parent node itself.

---
 .../bindings/gpio/trivial-gpio.yaml           |   2 -
 .../devicetree/bindings/mfd/max77620.txt      | 162 -------
 .../bindings/mfd/maxim,max77620.yaml          | 424 ++++++++++++++++++
 .../bindings/thermal/max77620_thermal.txt     |  70 ---
 4 files changed, 424 insertions(+), 234 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/max77620.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/maxim,max77620.yaml
 delete mode 100644 Documentation/devicetree/bindings/thermal/max77620_thermal.txt
Documentation/devicetree/bindings/gpio/trivial-gpio.yaml +0 -2
index 3f4bbd57fc52..fe9b14a72d69 100644
@@ -27,7 +27,6 @@ properties:
           - gateworks,pld-gpio
           - ibm,ppc4xx-gpio
           - loongson,ls1x-gpio
-          - maxim,max77620
           - nintendo,hollywood-gpio
           - nxp,pca9570
           - nxp,pca9571
@@ -86,7 +85,6 @@ allOf:
         compatible:
           contains:
             enum:
-              - maxim,max77620
               - rockchip,rk3328-grf-gpio
               - ti,lp3943-gpio
               - ti,palmas-gpio
Documentation/devicetree/bindings/mfd/max77620.txt deleted +0 -162

162 lines not on this page · raw message

Documentation/devicetree/bindings/mfd/maxim,max77620.yaml new file +424 -0

424 lines not on this page · raw message

Documentation/devicetree/bindings/thermal/max77620_thermal.txt deleted +0 -70

70 lines not on this page · raw message

Signature · 1 line
2.51.0
maintainer Reviewed-by on v4 3/5
#9 lore raw

Re: [PATCH v4 3/5] dt-bindings: mfd: max77620: convert to DT schema

Quoted 7 lines · Svyatoslav Ryhel

Convert max77620 devicetree bindings from TXT to YAML format. This patch does not change any functionality; the bindings remain the same. The thermal bindings are incorporated into the binding. GPIO controller function in MAX77620 has no dedicated node and is folded into the parent node itself.

Quoted 10 lines
---
 .../bindings/gpio/trivial-gpio.yaml           |   2 -
 .../devicetree/bindings/mfd/max77620.txt      | 162 -------
 .../bindings/mfd/maxim,max77620.yaml          | 424 ++++++++++++++++++
 .../bindings/thermal/max77620_thermal.txt     |  70 ---
 4 files changed, 424 insertions(+), 234 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/max77620.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/maxim,max77620.yaml
 delete mode 100644 Documentation/devicetree/bindings/thermal/max77620_thermal.txt
Acked-by on v4 3/5
#10 lore raw

Re: [PATCH v4 3/5] dt-bindings: mfd: max77620: convert to DT schema

In reply to Svyatoslav Ryhel
Quoted 8 lines · Svyatoslav Ryhel

Convert max77620 devicetree bindings from TXT to YAML format. This patch does not change any functionality; the bindings remain the same. The thermal bindings are incorporated into the binding. GPIO controller function in MAX77620 has no dedicated node and is folded into the parent node itself.

---

For the thermal part:

maintainer Applied
#11 lore raw

Re: (subset) [PATCH v4 3/5] dt-bindings: mfd: max77620: convert to DT schema

In reply to Svyatoslav Ryhel
Quoted 8 lines · Svyatoslav Ryhel

Convert max77620 devicetree bindings from TXT to YAML format. This patch does not change any functionality; the bindings remain the same. The thermal bindings are incorporated into the binding. GPIO controller function in MAX77620 has no dedicated node and is folded into the parent node itself.

[...]

Applied, thanks!

[3/5] dt-bindings: mfd: max77620: convert to DT schema

      commit: 77c8585abf5d7409990b71ba333e839bf4597cb5

--
Lee Jones [李琼斯]

#12 lore raw

PATCH v4 4/5 dt-bindings: mfd: max77620: document optional RTC address for MAX77663

In reply to Svyatoslav Ryhel

Document an optional second I2C address for the MAX77663 PMIC's RTC device, to be used if the MAX77663 RTC is located at a non-default I2C address.

---
 .../bindings/mfd/maxim,max77620.yaml          | 22 ++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/mfd/maxim,max77620.yaml +21 -1
index 85d7fe0f9f85..602711865274 100644
@@ -17,7 +17,17 @@ properties:
       - maxim,max77663
 
   reg:
-    maxItems: 1
+    description:
+      Can contain an optional second I2C address pointing to the PMIC's
+      RTC device. If no RTC address is provided, a default address specific
+      to this PMIC will be used.
+    minItems: 1
+    maxItems: 2
+
+  reg-names:
+    items:
+      - const: pmic
+      - const: rtc
 
   interrupts:
     maxItems: 1
@@ -192,6 +202,16 @@ allOf:
                 maxim,suspend-fps-time-period-us:
                   enum: [40, 80, 160, 320, 640, 1280, 2560, 5120]
 
+  - if:
+      properties:
+        compatible:
+          not:
+            contains:
+              const: maxim,max77663
+    then:
+      properties:
+        reg-names: false
+
 required:
   - compatible
   - reg
Signature · 1 line
2.51.0
maintainer Reviewed-by on v4 4/5
#13 lore raw

Re: [PATCH v4 4/5] dt-bindings: mfd: max77620: document optional RTC address for MAX77663

Quoted 9 lines · Svyatoslav Ryhel

Document an optional second I2C address for the MAX77663 PMIC's RTC device, to be used if the MAX77663 RTC is located at a non-default I2C address.

---
 .../bindings/mfd/maxim,max77620.yaml          | 22 ++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
maintainer Applied
#14 lore raw

Re: (subset) [PATCH v4 4/5] dt-bindings: mfd: max77620: document optional RTC address for MAX77663

In reply to Svyatoslav Ryhel
Quoted 5 lines · Svyatoslav Ryhel

Document an optional second I2C address for the MAX77663 PMIC's RTC device, to be used if the MAX77663 RTC is located at a non-default I2C address.

Applied, thanks!

[4/5] dt-bindings: mfd: max77620: document optional RTC address for MAX77663

      commit: a526075f56fb8f2fd96f791654ff1557e6680bde

--
Lee Jones [李琼斯]

#15 lore raw

PATCH v4 5/5 rtc: max77686: convert to i2c_new_ancillary_device

In reply to Svyatoslav Ryhel

Convert RTC I2C device creation from devm_i2c_new_dummy_device() to i2c_new_ancillary_device() to enable the use of a device tree-specified RTC address instead of a hardcoded value. If the device tree does not provide an address, use hardcoded values as a fallback.

This addresses an issue with the MAX77663 PMIC, which can have the RTC at different I2C positions (either 0x48, like the MAX77714, or 0x68, like the MAX77620). The MAX77620 value is used as the default. The I2C position of the MAX77663 is factory-set and cannot be detected from the chip itself.

---
 drivers/rtc/rtc-max77686.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/rtc/rtc-max77686.c +12 -2
index 69ea3ce75b5a..3cdfd78a07cc 100644
@@ -686,6 +686,11 @@ static int max77686_rtc_init_reg(struct max77686_rtc_info *info)
 	return ret;
 }
 
+static void max77686_rtc_release_dev(void *client)
+{
+	i2c_unregister_device(client);
+}
+
 static int max77686_init_rtc_regmap(struct max77686_rtc_info *info)
 {
 	struct device *parent = info->dev->parent;
@@ -713,12 +718,17 @@ static int max77686_init_rtc_regmap(struct max77686_rtc_info *info)
 		goto add_rtc_irq;
 	}
 
-	client = devm_i2c_new_dummy_device(info->dev, parent_i2c->adapter,
-					   info->drv_data->rtc_i2c_addr);
+	client = i2c_new_ancillary_device(parent_i2c, "rtc",
+					  info->drv_data->rtc_i2c_addr);
 	if (IS_ERR(client))
 		return dev_err_probe(info->dev, PTR_ERR(client),
 				     "Failed to allocate I2C device for RTC\n");
 
+	ret = devm_add_action_or_reset(info->dev, max77686_rtc_release_dev,
+				       client);
+	if (ret)
+		return ret;
+
 	info->rtc_regmap = devm_regmap_init_i2c(client,
 						info->drv_data->regmap_config);
 	if (IS_ERR(info->rtc_regmap))
Signature · 1 line
2.51.0
maintainer Applied
#16 lore raw

Re: (subset) [PATCH v4 0/5] rtc: max77686: convert to i2c_new_ancillary_device

In reply to Svyatoslav Ryhel
Quoted 8 lines · Svyatoslav Ryhel

rtc: max77686: convert to i2c_new_ancillary_device

Convert RTC I2C device creation from devm_i2c_new_dummy_device() to i2c_new_ancillary_device() to enable the use of a device tree-specified RTC address instead of a hardcoded value. If the device tree does not provide an address, use hardcoded values as a fallback.

[...]

Applied, thanks!

[5/5] rtc: max77686: convert to i2c_new_ancillary_device

      https://git.kernel.org/abelloni/c/0d65a9d93d87

Best regards,