Skip to contentSkip to conversation

dt-bindings: mfd: Use generic power-controller schema

PATCH In review Peng Fan (OSS) 5 participants 25 messages Aug 4 – Aug 6

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

cover dt-bindings: mfd: Use generic power-controller schema

The generic power-controller.yaml schema has been added to dt-schema[1], providing a common definition for the system-power-controller boolean property. Convert MFD bindings that locally define this property to instead reference the shared schema.

The common change across all patches is:
- Add a $ref to /schemas/power/power-controller.yaml#
- Remove the local system-power-controller property definition
- Switch from additionalProperties to unevaluatedProperties

This is a pick of patches 2-11 from [2], rebased to linux-next/master, no changes. Patch 1 (the generic power-controller.yaml schema itself) is dropped since it has already been picked up by dt-schema.

[1] https://github.com/devicetree-org/dt-schema/pull/187
[2] https://lore.kernel.org/all/177523251875.1559844.9690289848283345069.b4-ty@b4/

---
Peng Fan (10):
dt-bindings: mfd: ene-kb[3]930: Use generic power-controller schema
dt-bindings: mfd: ti,tps65910: Use generic power-controller schema
dt-bindings: mfd: rockchip,rk8x: Use generic power-controller schema
dt-bindings: mfd: ricoh,rn5t618: Use generic power-controller schema
dt-bindings: mfd: netronix,ntxec: Use generic power-controller schema
dt-bindings: mfd: ti,twl: Use generic power-controller schema
dt-bindings: mfd: ti,tps6594: Use generic power-controller schema
dt-bindings: mfd: rohm,bd71828-pmic: Use generic power-controller schema
dt-bindings: mfd: fsl,mc13xxx: Use generic power-controller schema
dt-bindings: mfd: samsung,s2mpg10-pmic: Use generic power-controller schema

 Documentation/devicetree/bindings/mfd/ene-kb3930.yaml          |  7 ++++---
 Documentation/devicetree/bindings/mfd/ene-kb930.yaml           |  6 +++---
 Documentation/devicetree/bindings/mfd/fsl,mc13xxx.yaml         |  5 ++---
 Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml      |  9 ++++-----
 Documentation/devicetree/bindings/mfd/ricoh,rn5t618.yaml       |  8 ++------
 Documentation/devicetree/bindings/mfd/rockchip,rk801.yaml      | 10 ++++------
 Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml      |  7 +++----
 Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml      |  3 +--
 Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml      |  9 +++++----
 Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml      | 10 ++++------
 Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml      |  5 ++---
 Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml      |  9 +++++----
 Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml   |  7 ++++---
 .../devicetree/bindings/mfd/samsung,s2mpg10-pmic.yaml          |  7 ++++---
 Documentation/devicetree/bindings/mfd/ti,tps65910.yaml         |  6 ++++--
 Documentation/devicetree/bindings/mfd/ti,tps6594.yaml          |  7 ++++---
 Documentation/devicetree/bindings/mfd/ti,twl.yaml              |  3 +--
 17 files changed, 56 insertions(+), 62 deletions(-)

---
base-commit: 9a4cdc958dd79fc6c3b20b51a10debec6ca09fec
change-id: 20260804-mfd-syspower-a3c8b6a467a4

Best regards,

Signature · 1 line
Peng Fan <[email protected]>
#1 lore raw

PATCH 1/10 dt-bindings: mfd: ene-kb[3]930: Use generic power-controller schema

From: Peng Fan <[email protected]>

Convert the binding to use the generic power-controller schema instead by referencing power-controller.yaml and removing the local system-power-controller property definition.

---
 Documentation/devicetree/bindings/mfd/ene-kb3930.yaml | 7 ++++---
 Documentation/devicetree/bindings/mfd/ene-kb930.yaml  | 6 +++---
 2 files changed, 7 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/mfd/ene-kb3930.yaml +4 -3
index 9b11b6e2bbf7..1847a6d5b22e 100644
@@ -13,6 +13,9 @@ description: |
 maintainers:
   - Lubomir Rintel <[email protected]>
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#
+
 properties:
   compatible:
     items:
@@ -26,13 +29,11 @@ properties:
     description: GPIO used with the shutdown protocol on Ariel
     maxItems: 2
 
-  system-power-controller: true
-
 required:
   - compatible
   - reg
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
Documentation/devicetree/bindings/mfd/ene-kb930.yaml +3 -3
index 02c111def5de..e0c8abf95bd9 100644
@@ -13,7 +13,9 @@ description: |
 maintainers:
   - Dmitry Osipenko <[email protected]>
 
-$ref: /schemas/power/supply/power-supply.yaml
+allOf:
+  - $ref: /schemas/power/supply/power-supply.yaml
+  - $ref: /schemas/power/power-controller.yaml#
 
 properties:
   compatible:
@@ -24,8 +26,6 @@ properties:
   reg:
     maxItems: 1
 
-  system-power-controller: true
-
 required:
   - compatible
   - reg
Signature · 1 line
2.51.0
#2 lore raw

Re: [PATCH 01/10] dt-bindings: mfd: ene-kb[3]930: Use generic power-controller schema

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Broken schema reference to non-existent power-controller.yaml --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Broken schema reference to non-existent power-controller.yaml
--

--- Patch [1]: [PATCH 01/10] dt-bindings: mfd: ene-kb[3]930: Use generic power-controller schema --- commit 7180a65c7f429628f30dced562271d7d6ecc790b
Author: Peng Fan <[email protected]>

dt-bindings: mfd: ene-kb[3]930: Use generic power-controller schema

Convert the binding to use the generic power-controller schema instead by referencing power-controller.yaml and removing the local system-power-controller property definition.

Documentation/devicetree/bindings/mfd/ene-kb3930.yaml description: | · line 17

Quoted 10 lines
Documentation/devicetree/bindings/mfd/ene-kb3930.yaml +2 -0
index 9b11b6e2bbf74..1847a6d5b22e8 100644
@@ -13,6 +13,9 @@ description: |
 maintainers:
   - Lubomir Rintel <[email protected]>
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#

[Severity: Low]
Does the /schemas/power/power-controller.yaml schema exist in the tree?

If the generic power-controller properties are only defined in a legacy text binding (Documentation/devicetree/bindings/power/power-controller.txt) and have not yet been converted to YAML, make dt_binding_check will fail because this reference cannot be resolved.

Additionally, since unevaluatedProperties is set to false, will removing the local system-power-controller property definition cause the example to be rejected as having an undocumented property?

[ ... ]

Documentation/devicetree/bindings/mfd/ene-kb930.yaml description: | · line 18

Quoted 12 lines
Documentation/devicetree/bindings/mfd/ene-kb930.yaml +3 -1
index 02c111def5de5..e0c8abf95bd92 100644
@@ -13,7 +13,9 @@ description: |
 maintainers:
   - Dmitry Osipenko <[email protected]>
 
-$ref: /schemas/power/supply/power-supply.yaml
+allOf:
+  - $ref: /schemas/power/supply/power-supply.yaml
+  - $ref: /schemas/power/power-controller.yaml#

[Severity: Low]
Similarly, will this reference to a non-existent schema file break dt_binding_check validation here?

[ ... ]

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#3 lore raw

PATCH 2/10 dt-bindings: mfd: ti,tps65910: Use generic power-controller schema

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Mark the "ti,system-power-controller" as deprecated and include a reference to power-controller.yaml to uses the common definition.

---
 Documentation/devicetree/bindings/mfd/ti,tps65910.yaml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mfd/ti,tps65910.yaml +4 -2
index f1a76f88fc0c..3939e8518a8e 100644
@@ -72,6 +72,7 @@ properties:
   ti,system-power-controller:
     type: boolean
     description: Identify whether or not this pmic controls the system power
+    deprecated: true
 
   ti,sleep-enable:
     type: boolean
@@ -170,9 +171,10 @@ required:
   - '#gpio-cells'
   - regulators
 
-additionalProperties: false
+unevaluatedProperties: false
 
 allOf:
+  - $ref: /schemas/power/power-controller.yaml#
   - if:
       properties:
         compatible:
@@ -216,7 +218,7 @@ examples:
             #interrupt-cells = <2>;
             interrupt-controller;
 
-            ti,system-power-controller;
+            system-power-controller;
 
             ti,vmbch-threshold = <0>;
             ti,vmbch2-threshold = <0>;
Signature · 7 lines
2.51.0


_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
#4 lore raw

Re: [PATCH 02/10] dt-bindings: mfd: ti,tps65910: Use generic power-controller schema

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] The device tree binding deprecates the vendor-specific `ti,system-power-controller` in favor of…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The device tree binding deprecates the vendor-specific ti,system-power-controller in favor of the generic system-power-controller property, but the driver has not been updated to support it, which will silently break system power-off functionality if device trees are migrated. --

--- Patch [2]: [PATCH 02/10] dt-bindings: mfd: ti,tps65910: Use generic power-controller schema --- commit ccd015dacbaad9942d09e771f8332a54d584d02f
Author: Peng Fan <[email protected]>

dt-bindings: mfd: ti,tps65910: Use generic power-controller schema

This commit deprecates the vendor-specific "ti,system-power-controller" property in favor of the generic "system-power-controller". It also includes a reference to the common power-controller.yaml schema.

Quoted 12 lines
Documentation/devicetree/bindings/mfd/ti,tps65910.yaml +1 -0
index f1a76f88fc0cd..3939e8518a8e7 100644
@@ -72,6 +72,7 @@ properties:
   ti,system-power-controller:
     type: boolean
     description: Identify whether or not this pmic controls the system power
+    deprecated: true
 
   ti,sleep-enable:
     type: boolean

[ ... ]

Documentation/devicetree/bindings/mfd/ti,tps65910.yaml examples: · line 224

Quoted 9 lines
Documentation/devicetree/bindings/mfd/ti,tps65910.yaml +1 -1
@@ -216,7 +218,7 @@ examples:
             #interrupt-cells = <2>;
             interrupt-controller;
 
-            ti,system-power-controller;
+            system-power-controller;
 
             ti,vmbch-threshold = <0>;
             ti,vmbch2-threshold = <0>;

[Severity: High]
If a user updates their device tree to use the generic property as recommended by this new example, will system power-off functionality silently fail?

Looking at the driver, it appears to only check for the deprecated vendor property:

drivers/mfd/tps65910.c:tps65910_parse_dt() {
    ...
	board_info->pm_off = of_property_read_bool(np,
			"ti,system-power-controller");
    ...
}

If the new generic property is used instead of the vendor one in the DT, tps65910_parse_dt() will leave pm_off as false, preventing pm_power_off from being registered.

Should the driver be updated to support the generic property (for example, by using of_device_is_system_power_controller()) alongside this binding change?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
maintainer
#5 lore raw

Re: [PATCH 02/10] dt-bindings: mfd: ti,tps65910: Use generic power-controller schema

In reply to Peng Fan (OSS)
Quoted 4 lines · Peng Fan (OSS)

From: Peng Fan <[email protected]>

Mark the "ti,system-power-controller" as deprecated and include a reference to power-controller.yaml to uses the common definition.

There's little point in doing this. You can't change existing DTs and you'll have to support both properties in the driver forever. Maybe if there are new devices added and new platforms.

Rob

#6 lore raw

PATCH 3/10 dt-bindings: mfd: rockchip,rk8x: Use generic power-controller schema

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Convert the binding to use the generic power-controller schema instead by referencing power-controller.yaml and removing the local system-power-controller property.

---
 Documentation/devicetree/bindings/mfd/rockchip,rk801.yaml | 10 ++++------
 Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml |  7 +++----
 Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml |  3 +--
 Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml |  9 +++++----
 Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml | 10 ++++------
 Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml |  5 ++---
 Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml |  9 +++++----
 7 files changed, 24 insertions(+), 29 deletions(-)
Documentation/devicetree/bindings/mfd/rockchip,rk801.yaml +4 -6
index 7c71447200ba..5d644f3fbe1b 100644
@@ -13,6 +13,9 @@ description: |
   Rockchip RK801 series PMIC. This device consists of an i2c controlled MFD
   that includes multiple switchable regulators.
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#
+
 properties:
   compatible:
     enum:
@@ -24,11 +27,6 @@ properties:
   interrupts:
     maxItems: 1
 
-  system-power-controller:
-    type: boolean
-    description:
-      Telling whether or not this PMIC is controlling the system power.
-
   wakeup-source:
     type: boolean
     description:
@@ -76,7 +74,7 @@ required:
   - reg
   - interrupts
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml +3 -4
index da2391530c16..7a123bcd4320 100644
@@ -46,8 +46,6 @@ properties:
     description:
       Telling whether or not this PMIC is controlling the system power.
 
-  system-power-controller: true
-
   wakeup-source:
     type: boolean
     description:
@@ -87,6 +85,7 @@ properties:
     unevaluatedProperties: false
 
 allOf:
+  - $ref: /schemas/power/power-controller.yaml#
   - if:
       properties:
         '#clock-cells':
@@ -108,7 +107,7 @@ required:
   - interrupts
   - "#clock-cells"
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
@@ -126,7 +125,7 @@ examples:
             interrupts = <RK_PA6 IRQ_TYPE_LEVEL_LOW>;
             pinctrl-names = "default";
             pinctrl-0 = <&pmic_int_l>;
-            rockchip,system-power-controller;
+            system-power-controller;
             wakeup-source;
             #clock-cells = <0>;
 
Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml +1 -2
index eb5bca31948e..e441c6489699 100644
@@ -29,8 +29,6 @@ properties:
   '#gpio-cells':
     const: 2
 
-  system-power-controller: true
-
   rockchip,reset-mode:
     $ref: /schemas/types.yaml#/definitions/uint32
     enum: [0, 1, 2]
@@ -136,6 +134,7 @@ patternProperties:
         enum: [gpio_pwrctrl1, gpio_pwrctrl2, gpio_pwrctrl3]
 
 allOf:
+  - $ref: /schemas/power/power-controller.yaml#
   - $ref: /schemas/spi/spi-peripheral-props.yaml
 
 required:
Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml +5 -4
index 50dfffac8fbf..9bb1467bf5ff 100644
@@ -14,6 +14,9 @@ description: |
   Rockchip RK808 series PMIC. This device consists of an i2c controlled MFD
   that includes regulators, an RTC, and a power button.
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#
+
 properties:
   compatible:
     enum:
@@ -41,8 +44,6 @@ properties:
     description:
       Telling whether or not this PMIC is controlling the system power.
 
-  system-power-controller: true
-
   wakeup-source:
     type: boolean
     description:
@@ -119,7 +120,7 @@ required:
   - interrupts
   - "#clock-cells"
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
@@ -140,7 +141,7 @@ examples:
             dvs-gpios = <&gpio7 11 GPIO_ACTIVE_HIGH>,
                 <&gpio7 15 GPIO_ACTIVE_HIGH>;
             reg = <0x1b>;
-            rockchip,system-power-controller;
+            system-power-controller;
             wakeup-source;
             #clock-cells = <1>;
 
Documentation/devicetree/bindings/mfd/rockchip,rk816.yaml +4 -6
index a58d9455a1a5..aa2e3ac1794e 100644
@@ -15,6 +15,9 @@ description:
   that includes regulators, a RTC, a GPIO controller, a power button, and a
   battery charger manager with fuel gauge.
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#
+
 properties:
   compatible:
     enum:
@@ -39,11 +42,6 @@ properties:
   '#gpio-cells':
     const: 2
 
-  system-power-controller:
-    type: boolean
-    description:
-      Telling whether or not this PMIC is controlling the system power.
-
   wakeup-source: true
 
   vcc1-supply:
@@ -107,7 +105,7 @@ required:
   - interrupts
   - '#clock-cells'
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml +2 -3
index 2cb6d176a84c..4c5d2f43a6f1 100644
@@ -53,8 +53,6 @@ properties:
   '#sound-dai-cells':
     const: 0
 
-  system-power-controller: true
-
   wakeup-source:
     type: boolean
     description:
@@ -157,6 +155,7 @@ properties:
     additionalProperties: false
 
 allOf:
+  - $ref: /schemas/power/power-controller.yaml#
   - $ref: /schemas/sound/dai-common.yaml#
   - if:
       properties:
@@ -195,7 +194,7 @@ required:
   - interrupts
   - "#clock-cells"
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml +5 -4
index 90d944c27ba1..d1ca8b447034 100644
@@ -14,6 +14,9 @@ description: |
   Rockchip RK818 series PMIC. This device consists of an i2c controlled MFD
   that includes regulators, an RTC, and a power button.
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#
+
 properties:
   compatible:
     enum:
@@ -41,8 +44,6 @@ properties:
     description:
       Telling whether or not this PMIC is controlling the system power.
 
-  system-power-controller: true
-
   wakeup-source:
     type: boolean
     description:
@@ -111,7 +112,7 @@ required:
   - interrupts
   - "#clock-cells"
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
@@ -130,7 +131,7 @@ examples:
             interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
             pinctrl-names = "default";
             pinctrl-0 = <&pmic_int>;
-            rockchip,system-power-controller;
+            system-power-controller;
             wakeup-source;
             #clock-cells = <1>;
 
Signature · 7 lines
2.51.0


_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
#7 lore raw

Re: [PATCH 03/10] dt-bindings: mfd: rockchip,rk8x: Use generic power-controller schema

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 7 lines

From: Peng Fan <[email protected]>

Convert the binding to use the generic power-controller schema instead by referencing power-controller.yaml and removing the local system-power-controller property.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
#8 lore raw

PATCH 4/10 dt-bindings: mfd: ricoh,rn5t618: Use generic power-controller schema

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Convert the binding to use the generic power-controller schema instead by referencing power-controller.yaml and removing the local system-power-controller property.

---
 Documentation/devicetree/bindings/mfd/ricoh,rn5t618.yaml | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/mfd/ricoh,rn5t618.yaml +2 -6
index e3d64307b531..d81691f4d574 100644
@@ -18,6 +18,7 @@ description: |
   The RC5T619 additionally includes USB charger detection and an RTC.
 
 allOf:
+  - $ref: /schemas/power/power-controller.yaml#
   - if:
       properties:
         compatible:
@@ -68,15 +69,10 @@ properties:
   interrupts:
     maxItems: 1
 
-  system-power-controller:
-    type: boolean
-    description: |
-      See Documentation/devicetree/bindings/power/power-controller.txt
-
   regulators:
     type: object
 
-additionalProperties: false
+unevaluatedProperties: false
 
 required:
   - compatible
Signature · 1 line
2.51.0
#9 lore raw

Re: [PATCH 04/10] dt-bindings: mfd: ricoh,rn5t618: Use generic power-controller schema

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 7 lines

From: Peng Fan <[email protected]>

Convert the binding to use the generic power-controller schema instead by referencing power-controller.yaml and removing the local system-power-controller property.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
#10 lore raw

PATCH 5/10 dt-bindings: mfd: netronix,ntxec: Use generic power-controller schema

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Convert the binding to use the generic power-controller schema instead by referencing power-controller.yaml and removing the local system-power-controller property.

---
 Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml +4 -5
index 37fbb953ea12..2fa8b797c0dc 100644
@@ -13,6 +13,9 @@ description: |
   This EC is found in e-book readers of multiple brands (e.g. Kobo, Tolino), and
   is typically implemented as a TI MSP430 microcontroller.
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#
+
 properties:
   compatible:
     const: netronix,ntxec
@@ -21,10 +24,6 @@ properties:
     items:
       - description: The I2C address of the EC
 
-  system-power-controller:
-    type: boolean
-    description: See Documentation/devicetree/bindings/power/power-controller.txt
-
   interrupts:
     minItems: 1
     description:
@@ -42,7 +41,7 @@ required:
   - compatible
   - reg
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
Signature · 7 lines
2.51.0


_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
#11 lore raw

Re: [PATCH 05/10] dt-bindings: mfd: netronix,ntxec: Use generic power-controller schema

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The patch introduces a schema `$ref` to `/schemas/power/power-controller.yaml#`, which does not…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch introduces a schema $ref to /schemas/power/power-controller.yaml#, which does not exist in the source tree, breaking schema validation. --

--- Patch [5]: [PATCH 05/10] dt-bindings: mfd: netronix,ntxec: Use generic power-controller schema --- commit c8d8d2474f8ae06d3e1689a3ed174b683577d897
Author: Peng Fan <[email protected]>

dt-bindings: mfd: netronix,ntxec: Use generic power-controller schema

This commit updates the netronix,ntxec binding to use the generic power-controller schema by adding a reference to power-controller.yaml and removing the locally defined system-power-controller property.

Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml description: | · line 17

Quoted 10 lines
Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml +2 -0
index 37fbb953ea12e..2fa8b797c0dcf 100644
@@ -13,6 +13,9 @@ description: |
   This EC is found in e-book readers of multiple brands (e.g. Kobo, Tolino), and
   is typically implemented as a TI MSP430 microcontroller.
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#

[Severity: Low]
Does power-controller.yaml exist in the kernel tree at this commit?

It appears the generic power controller schema might still be a .txt file. Referencing a non-existent YAML file causes the dt_binding_check target to fail with an unresolved reference error.

Additionally, because unevaluatedProperties is set to false in this binding, failing to resolve the schema means the system-power-controller property used in the example will be flagged as an invalid property.

[ ... ]

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
#12 lore raw

PATCH 6/10 dt-bindings: mfd: ti,twl: Use generic power-controller schema

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Switch the binding to use the generic power-controller schema instead by referencing power-controller.yaml and removing the local system-power-controller property.

---
 Documentation/devicetree/bindings/mfd/ti,twl.yaml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Documentation/devicetree/bindings/mfd/ti,twl.yaml +1 -2
index 9cc3e4721612..4b6b68aaee76 100644
@@ -16,6 +16,7 @@ description: |
   These chips are connected to an I2C bus.
 
 allOf:
+  - $ref: /schemas/power/power-controller.yaml#
   - if:
       properties:
         compatible:
@@ -205,8 +206,6 @@ properties:
 
   interrupt-controller: true
 
-  system-power-controller: true
-
   "#interrupt-cells":
     const: 1
 
Signature · 7 lines
2.51.0


_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
#13 lore raw

Re: [PATCH 06/10] dt-bindings: mfd: ti,twl: Use generic power-controller schema

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 7 lines

From: Peng Fan <[email protected]>

Switch the binding to use the generic power-controller schema instead by referencing power-controller.yaml and removing the local system-power-controller property.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=6
#14 lore raw

PATCH 7/10 dt-bindings: mfd: ti,tps6594: Use generic power-controller schema

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Switch the binding to use the generic power-controller schema instead by referencing power-controller.yaml and removing the local system-power-controller property definition.

---
 Documentation/devicetree/bindings/mfd/ti,tps6594.yaml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/mfd/ti,tps6594.yaml +4 -3
index ca17fbdea691..6a35cd358590 100644
@@ -15,6 +15,9 @@ description:
   PFSM (Pre-configurable Finite State Machine) managing the state of the device.
   TPS6594 is the super-set device while TPS6593 and LP8764 are derivatives.
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#
+
 properties:
   compatible:
     enum:
@@ -38,8 +41,6 @@ properties:
       device on the SPMI bus, and the secondary PMICs are the target devices
       on the SPMI bus.
 
-  system-power-controller: true
-
   gpio-controller: true
   gpio-line-names: true
 
@@ -104,7 +105,7 @@ required:
   - reg
   - interrupts
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
Signature · 7 lines
2.51.0


_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
#15 lore raw

Re: [PATCH 07/10] dt-bindings: mfd: ti,tps6594: Use generic power-controller schema

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 7 lines

From: Peng Fan <[email protected]>

Switch the binding to use the generic power-controller schema instead by referencing power-controller.yaml and removing the local system-power-controller property definition.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=7
#16 lore raw

PATCH 8/10 dt-bindings: mfd: rohm,bd71828-pmic: Use generic power-controller schema

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Switch the binding to use the generic power-controller schema instead by referencing power-controller.yaml and removing the local system-power-controller property definition.

---
 Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml +4 -3
index 09e7d68e92bf..9818102e02c7 100644
@@ -15,6 +15,9 @@ description: |
   single-cell linear charger. Also included is a Coulomb counter, a real-time
   clock (RTC), and a 32.768 kHz clock gate.
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#
+
 properties:
   compatible:
     oneOf:
@@ -79,8 +82,6 @@ properties:
       used to mark the pins which should not be configured for GPIO. Please see
       the ../gpio/gpio.txt for more information.
 
-  system-power-controller: true
-
 required:
   - compatible
   - reg
@@ -91,7 +92,7 @@ required:
   - gpio-controller
   - "#gpio-cells"
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
Signature · 1 line
2.51.0
#17 lore raw

Re: [PATCH 08/10] dt-bindings: mfd: rohm,bd71828-pmic: Use generic power-controller schema

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The device tree schema references a missing generic schema file…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The device tree schema references a missing generic schema file (/schemas/power/power-controller.yaml#), which breaks schema validation. --

--- Patch [8]: [PATCH 08/10] dt-bindings: mfd: rohm,bd71828-pmic: Use generic power-controller schema --- commit fe53293ad6a768dfc275a4c74e7fe894633d1720
Author: Peng Fan <[email protected]>

dt-bindings: mfd: rohm,bd71828-pmic: Use generic power-controller schema

This patch updates the bd71828-pmic binding to use the generic power controller schema. It references power-controller.yaml, removes the local system-power-controller property, and switches additionalProperties to unevaluatedProperties.

Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml description: | · line 19

Quoted 10 lines
Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml +2 -0
index 09e7d68e92bf3..9818102e02c75 100644
@@ -15,6 +15,9 @@ description: |
   single-cell linear charger. Also included is a Coulomb counter, a real-time
   clock (RTC), and a 32.768 kHz clock gate.
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#

[Severity: Low]
Does this reference resolve correctly in the current tree? It appears that power-controller.yaml has not been converted yet, and only the original power-controller.txt exists in Documentation/devicetree/bindings/power/. If the target schema file is missing, dtschema will be unable to resolve the reference, which causes schema validation to fail when running make dt_binding_check.

[ ... ]

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=8
#18 lore raw

Re: [PATCH 08/10] dt-bindings: mfd: rohm,bd71828-pmic: Use generic power-controller schema

In reply to Peng Fan (OSS)

Hi Peng,

Quoted 35 lines · Peng Fan (OSS)

From: Peng Fan <[email protected]>

Switch the binding to use the generic power-controller schema instead by referencing power-controller.yaml and removing the local system-power-controller property definition.

---
  Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml +3 -2
index 09e7d68e92bf..9818102e02c7 100644
@@ -15,6 +15,9 @@ description: |
    single-cell linear charger. Also included is a Coulomb counter, a real-time
    clock (RTC), and a 32.768 kHz clock gate.
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#
+
  properties:
    compatible:
      oneOf:
@@ -79,8 +82,6 @@ properties:
        used to mark the pins which should not be configured for GPIO. Please see
        the ../gpio/gpio.txt for more information.
 
-  system-power-controller: true
-
  required:
    - compatible
    - reg

Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml required: · line 95

Quoted 5 lines
Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml +1 -1
@@ -91,7 +92,7 @@ required:
    - gpio-controller
    - "#gpio-cells"
 
-additionalProperties: false
+unevaluatedProperties: false

If I am not mistaken, this allows all bindings from referenced common binding files, whether or not they are declared in this binding? If so, then this is probably not aligned with what I am hoping to do with the ROHM PMIC bindings [1] [2].

I hope to collect the commonly used ROHM PMIC bindings in one common file, and reference it from those PMIC files, which use some of those common properties. I would like to collect all of the commonly used ROHM MFD bindings in the same file because scattering them around in tiny files feels like a bad idea to me. This means that not all of the PMICs referencing this file, use all of the bindings from that file.

Hence I would prefer not to just allow everything from the common file - but to limit allowed properties to those that are explicitly mentioned for the specific PMIC. For example, my proposed change [1] moves:

rohm,clkout-open-drain, rohm,pin-clkout, rohm,pin-fault_b, "^rohm,pin-dvs[0-1]$" and "^rohm,pin-exten([0-1])?$" to rohm,pmic-pins.yaml. Only the rohm,clkout-open-drain should be supported allowed with the bd71828. Keeping:
additionalProperties: false

disallows the properties which aren't explicitly mentioned for the bd71828, while making it possible to keep the description, type and other common stuff in the common rohm,pmic-pins.yaml.

Also, keeping the single explicit line:

system-power-controller: true

to denote this specific PMIC can act as a system power controller feels (to me) more descriptive than "hiding" it in

$ref: /schemas/power/power-controller.yaml#

- which is also a single line.

As a summary - would it work if you added the reference (for description), but also kept the explicit system-power-controller: true and also the additionalProperties: false?

[1] https://lore.kernel.org/all/838486b443af9188410d8b802a818dc0af20ea9d.1785838585.git.mazziesaccount@gmail.com/
[2] https://lore.kernel.org/all/d419dcf8776f7ea88e4a66b9a0f0087f11e6622c.1785838585.git.mazziesaccount@gmail.com/

Yours,
-- Matti

Quoted 3 lines
Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml +0 -0
  examples:
    - |
 
Signature · 5 lines
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~
#19 lore raw

PATCH 9/10 dt-bindings: mfd: fsl,mc13xxx: Use generic power-controller schema

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Switch the binding to use the generic power-controller schema instead by referencing power-controller.yaml and removing the local system-power-controller property definition.

---
 Documentation/devicetree/bindings/mfd/fsl,mc13xxx.yaml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/mfd/fsl,mc13xxx.yaml +2 -3
index 5cdb25be2731..24b9706c5c17 100644
@@ -34,8 +34,6 @@ properties:
 
   spi-cs-high: true
 
-  system-power-controller: true
-
   interrupts:
     maxItems: 1
 
@@ -174,6 +172,7 @@ required:
   - reg
 
 allOf:
+  - $ref: /schemas/power/power-controller.yaml#
   - if:
       properties:
         compatible:
@@ -233,7 +232,7 @@ allOf:
               minItems: 1
               maxItems: 1
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
Signature · 7 lines
2.51.0


_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
#20 lore raw

Re: [PATCH 09/10] dt-bindings: mfd: fsl,mc13xxx: Use generic power-controller schema

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Broken schema reference to a nonexistent YAML file. --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Broken schema reference to a nonexistent YAML file.
--

--- Patch [9]: [PATCH 09/10] dt-bindings: mfd: fsl,mc13xxx: Use generic power-controller schema --- commit eeab4b123a8fd6063871fdea625f14e773ee0aa4
Author: Peng Fan <[email protected]>

dt-bindings: mfd: fsl,mc13xxx: Use generic power-controller schema

This commit switches the fsl,mc13xxx binding to use the generic power controller schema. It removes the local system-power-controller property and references the generic power-controller.yaml file.

Quoted 3 lines
Documentation/devicetree/bindings/mfd/fsl,mc13xxx.yaml +0 -0

[ ... ]

Documentation/devicetree/bindings/mfd/fsl,mc13xxx.yaml required: · line 175

Quoted 5 lines
Documentation/devicetree/bindings/mfd/fsl,mc13xxx.yaml +1 -0
@@ -174,6 +172,7 @@ required:
   - reg
 
 allOf:
+  - $ref: /schemas/power/power-controller.yaml#

[Severity: Low]
Does the power-controller.yaml schema exist in the tree yet?

It appears the generic power controller schema remains a legacy power-controller.txt file in this tree. Adding this reference will cause make dt_binding_check to fail with a schema reference resolution error since the referenced YAML file does not actually exist.

Quoted 3 lines
Documentation/devicetree/bindings/mfd/fsl,mc13xxx.yaml +0 -0
   - if:
       properties:
         compatible:
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=9
#21 lore raw

PATCH 10/10 dt-bindings: mfd: samsung,s2mpg10-pmic: Use generic power-controller schema

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Switch the binding to use the generic power-controller schema instead by referencing power-controller.yaml and removing the local system-power-controller property definition.

---
 Documentation/devicetree/bindings/mfd/samsung,s2mpg10-pmic.yaml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/mfd/samsung,s2mpg10-pmic.yaml +4 -3
index 0ea1a440b983..47418077b153 100644
@@ -18,6 +18,9 @@ description: |
   GPIO interfaces and is typically complemented by S2MPG10 PMIC in a main/sub
   configuration as the main PMIC.
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#
+
 properties:
   compatible:
     const: samsung,s2mpg10-pmic
@@ -36,8 +39,6 @@ properties:
     description:
       List of child nodes that specify the regulators.
 
-  system-power-controller: true
-
   wakeup-source: true
 
 patternProperties:
@@ -71,7 +72,7 @@ required:
   - interrupts
   - regulators
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
Signature · 7 lines
2.51.0


_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
#22 lore raw

Re: [PATCH 10/10] dt-bindings: mfd: samsung,s2mpg10-pmic: Use generic power-controller schema

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 7 lines

From: Peng Fan <[email protected]>

Switch the binding to use the generic power-controller schema instead by referencing power-controller.yaml and removing the local system-power-controller property definition.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=10
maintainer
#23 lore raw
In reply to Peng Fan (OSS)
Quoted 18 lines · Peng Fan (OSS)

The generic power-controller.yaml schema has been added to dt-schema[1], providing a common definition for the system-power-controller boolean property. Convert MFD bindings that locally define this property to instead reference the shared schema.

The common change across all patches is:
- Add a $ref to /schemas/power/power-controller.yaml#
- Remove the local system-power-controller property definition
- Switch from additionalProperties to unevaluatedProperties

This is a pick of patches 2-11 from [2], rebased to linux-next/master, no changes. Patch 1 (the generic power-controller.yaml schema itself) is dropped since it has already been picked up by dt-schema.

[1] https://github.com/devicetree-org/dt-schema/pull/187
[2] https://lore.kernel.org/all/177523251875.1559844.9690289848283345069.b4-ty@b4/

Quoted 12 lines

---
Peng Fan (10):
dt-bindings: mfd: ene-kb[3]930: Use generic power-controller schema
dt-bindings: mfd: ti,tps65910: Use generic power-controller schema
dt-bindings: mfd: rockchip,rk8x: Use generic power-controller schema
dt-bindings: mfd: ricoh,rn5t618: Use generic power-controller schema
dt-bindings: mfd: netronix,ntxec: Use generic power-controller schema
dt-bindings: mfd: ti,twl: Use generic power-controller schema
dt-bindings: mfd: ti,tps6594: Use generic power-controller schema
dt-bindings: mfd: rohm,bd71828-pmic: Use generic power-controller schema
dt-bindings: mfd: fsl,mc13xxx: Use generic power-controller schema
dt-bindings: mfd: samsung,s2mpg10-pmic: Use generic power-controller schema

Can we hold off on this until at least the next cycle. This change effectively bumps the minimum version of dtschema. While power-controller.yaml is added to dtschema, it is not yet in a released version. I'm not all that sure these changes are much improvement given it is a single boolean.

Rob

#24 lore raw

Hi Rob,

Quoted 36 lines

Subject: Re: [PATCH 00/10] dt-bindings: mfd: Use generic power- controller schema

Quoted 3 lines · Peng Fan (OSS)

The generic power-controller.yaml schema has been added to dt-schema[1], providing a common definition for the system-power-controller boolean property. Convert MFD bindings

that

Quoted 12 lines

locally define this property to instead reference the shared schema.

The common change across all patches is:
- Add a $ref to /schemas/power/power-controller.yaml#
- Remove the local system-power-controller property definition
- Switch from additionalProperties to unevaluatedProperties

This is a pick of patches 2-11 from [2], rebased to linux-next/master, no changes. Patch 1 (the generic power-controller.yaml schema itself) is dropped since it has already been picked up by dt-schema.

Quoted 4 lines

---
Peng Fan (10):
dt-bindings: mfd: ene-kb[3]930: Use generic power-controller

schema

Quoted 1 line

dt-bindings: mfd: ti,tps65910: Use generic power-controller

schema

Quoted 1 line

dt-bindings: mfd: rockchip,rk8x: Use generic power-controller

schema

Quoted 1 line

dt-bindings: mfd: ricoh,rn5t618: Use generic power-controller

schema

Quoted 1 line

dt-bindings: mfd: netronix,ntxec: Use generic power-controller

schema

Quoted 2 lines

dt-bindings: mfd: ti,twl: Use generic power-controller schema
dt-bindings: mfd: ti,tps6594: Use generic power-controller

schema

Quoted 8 lines
Quoted 1 line

dt-bindings: mfd: rohm,bd71828-pmic: Use generic power-

controller schema

Quoted 1 line

dt-bindings: mfd: fsl,mc13xxx: Use generic power-controller

schema

Quoted 2 lines

dt-bindings: mfd: samsung,s2mpg10-pmic: Use generic
power-controller schema

Can we hold off on this until at least the next cycle.

Sure.

This change

Quoted 4 lines

effectively bumps the minimum version of dtschema. While power- controller.yaml is added to dtschema, it is not yet in a released version. I'm not all that sure these changes are much improvement given it is a single boolean.

If you prefer, I could drop the patchset.

Thanks,
Peng.

Quoted 2 lines

Rob