Skip to contentSkip to conversation

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

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

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

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

The generic power-controller.yaml schema has been added to dt-schema, providing a common definition for the system-power-controller boolean property. Convert regulator 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 the regulator patches from [1], rebased to linux-next/master, no changes. A-b tags are kept, because they are cleanly applied using "b4 shazam".

[1] https://lore.kernel.org/all/177523251875.1559844.9690289848283345069.b4-ty@b4/

---
Peng Fan (2):
dt-bindings: regulator: ti,tps65219: Use generic power-controller schema
dt-bindings: regulator: act8x: Use generic power-controller schema

 .../devicetree/bindings/regulator/active-semi,act8600.yaml    | 11 ++++-------
 .../devicetree/bindings/regulator/active-semi,act8846.yaml    | 11 ++++-------
 .../devicetree/bindings/regulator/active-semi,act8865.yaml    | 11 ++++-------
 .../devicetree/bindings/regulator/active-semi,act8945a.yaml   | 11 ++++-------
 Documentation/devicetree/bindings/regulator/ti,tps65219.yaml  |  8 ++------
 5 files changed, 18 insertions(+), 34 deletions(-)

---
base-commit: 9a4cdc958dd79fc6c3b20b51a10debec6ca09fec
change-id: 20260804-regulator-syspower-3ca6ed43d911

Best regards,

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

PATCH 1/2 dt-bindings: regulator: ti,tps65219: 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/regulator/ti,tps65219.yaml | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/regulator/ti,tps65219.yaml +2 -6
index 7c64e588a8b5..d3a82aa7319f 100644
@@ -31,11 +31,6 @@ properties:
   reg:
     maxItems: 1
 
-  system-power-controller:
-    type: boolean
-    description: Optional property that indicates that this device is
-      controlling system power.
-
   interrupts:
     description: Short-circuit, over-current, under-voltage for regulators, PB interrupts.
     maxItems: 1
@@ -99,9 +94,10 @@ required:
   - interrupts
   - regulators
 
-additionalProperties: false
+unevaluatedProperties: false
 
 allOf:
+  - $ref: /schemas/power/power-controller.yaml#
   - if:
       properties:
         compatible:
Signature · 1 line
2.51.0
#2 lore raw

Re: [PATCH 1/2] dt-bindings: regulator: ti,tps65219: Use generic power-controller schema

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The patch references a non-existent generic YAML schema `/schemas/power/power-controller.yaml#`. --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch references a non-existent generic YAML schema /schemas/power/power-controller.yaml#. --

--- Patch [1]: [PATCH 1/2] dt-bindings: regulator: ti,tps65219: Use generic power-controller schema --- commit cf2a7a6bb686cde6c0c0239ec4f30d1057f13e9e
Author: Peng Fan <[email protected]>

dt-bindings: regulator: ti,tps65219: Use generic power-controller schema

This commit converts the ti,tps65219 binding to use the generic power controller schema by removing the local system-power-controller property and referencing power-controller.yaml.

Quoted 4 lines
Documentation/devicetree/bindings/regulator/ti,tps65219.yaml +0 -0
index 7c64e588a8b54..d3a82aa7319f0 100644

[ ... ]

Documentation/devicetree/bindings/regulator/ti,tps65219.yaml required: · line 100

Quoted 9 lines
Documentation/devicetree/bindings/regulator/ti,tps65219.yaml +2 -1
@@ -99,9 +94,10 @@ required:
   - interrupts
   - regulators
 
-additionalProperties: false
+unevaluatedProperties: false
 
 allOf:
+  - $ref: /schemas/power/power-controller.yaml#

[Severity: Low]
Does this generic schema actually exist in the kernel tree yet? It appears the target might still be power-controller.txt, meaning this reference could cause dt_binding_check validation to fail with a schema resolution error.

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

Re: [PATCH 1/2] dt-bindings: regulator: ti,tps65219: Use generic power-controller schema

In reply to Peng Fan (OSS)
Quoted 11 lines · 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 definition.

---
 Documentation/devicetree/bindings/regulator/ti,tps65219.yaml | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

These need to wait a cycle. The dtschema dependency is not even in a release yet.

Rob

#4 lore raw

PATCH 2/2 dt-bindings: regulator: act8x: 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 definition.

---
 .../devicetree/bindings/regulator/active-semi,act8600.yaml    | 11 ++++-------
 .../devicetree/bindings/regulator/active-semi,act8846.yaml    | 11 ++++-------
 .../devicetree/bindings/regulator/active-semi,act8865.yaml    | 11 ++++-------
 .../devicetree/bindings/regulator/active-semi,act8945a.yaml   | 11 ++++-------
 4 files changed, 16 insertions(+), 28 deletions(-)
Documentation/devicetree/bindings/regulator/active-semi,act8600.yaml +4 -7
index b8ca967bc83d..49f74a9b1eaa 100644
@@ -9,6 +9,9 @@ title: Active-semi ACT8600 regulator
 maintainers:
   - Paul Cercueil <[email protected]>
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#
+
 properties:
   compatible:
     const: active-semi,act8600
@@ -16,12 +19,6 @@ properties:
   reg:
     maxItems: 1
 
-  system-power-controller:
-    description:
-      Indicates that the ACT8600 is responsible for powering OFF
-      the system.
-    type: boolean
-
   active-semi,vsel-high:
     description:
       Indicates the VSEL pin is high. If this property is missing,
@@ -75,7 +72,7 @@ properties:
           inl-supply:
             description: Handle to the INL input supply
 
-additionalProperties: false
+unevaluatedProperties: false
 
 required:
   - reg
Documentation/devicetree/bindings/regulator/active-semi,act8846.yaml +4 -7
index 02f45b5834d0..29ec8ab1b642 100644
@@ -9,6 +9,9 @@ title: Active-semi ACT8846 regulator
 maintainers:
   - Paul Cercueil <[email protected]>
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#
+
 properties:
   compatible:
     const: active-semi,act8846
@@ -16,12 +19,6 @@ properties:
   reg:
     maxItems: 1
 
-  system-power-controller:
-    description:
-      Indicates that the ACT8846 is responsible for powering OFF
-      the system.
-    type: boolean
-
   active-semi,vsel-high:
     description:
       Indicates the VSEL pin is high. If this property is missing,
@@ -59,7 +56,7 @@ properties:
         $ref: /schemas/regulator/regulator.yaml#
         unevaluatedProperties: false
 
-additionalProperties: false
+unevaluatedProperties: false
 
 required:
   - reg
Documentation/devicetree/bindings/regulator/active-semi,act8865.yaml +4 -7
index afe1abc2d727..2423d9b65192 100644
@@ -9,6 +9,9 @@ title: Active-semi ACT8865 regulator
 maintainers:
   - Paul Cercueil <[email protected]>
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#
+
 properties:
   compatible:
     const: active-semi,act8865
@@ -16,12 +19,6 @@ properties:
   reg:
     maxItems: 1
 
-  system-power-controller:
-    description:
-      Indicates that the ACT8865 is responsible for powering OFF
-      the system.
-    type: boolean
-
   active-semi,vsel-high:
     description:
       Indicates the VSEL pin is high. If this property is missing,
@@ -79,7 +76,7 @@ properties:
           inl67-supply:
             description: Handle to the INL67 input supply
 
-additionalProperties: false
+unevaluatedProperties: false
 
 required:
   - reg
Documentation/devicetree/bindings/regulator/active-semi,act8945a.yaml +4 -7
index a8d579844dc7..f19d3f0e0784 100644
@@ -9,6 +9,9 @@ title: Active-semi ACT8945a regulator
 maintainers:
   - Paul Cercueil <[email protected]>
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#
+
 properties:
   compatible:
     const: active-semi,act8945a
@@ -16,12 +19,6 @@ properties:
   reg:
     maxItems: 1
 
-  system-power-controller:
-    description:
-      Indicates that the ACT8945a is responsible for powering OFF
-      the system.
-    type: boolean
-
   active-semi,vsel-high:
     description:
       Indicates the VSEL pin is high. If this property is missing,
@@ -127,7 +124,7 @@ properties:
       - active-semi,chglev-gpios
       - active-semi,lbo-gpios
 
-additionalProperties: false
+unevaluatedProperties: false
 
 required:
   - reg
Signature · 1 line
2.51.0
#5 lore raw

Re: [PATCH 2/2] dt-bindings: regulator: act8x: Use generic power-controller schema

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

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

--- Patch [2]: [PATCH 2/2] dt-bindings: regulator: act8x: Use generic power-controller schema --- commit dbd959e51dadcb9629319a89cca123c97aebf588
Author: Peng Fan <[email protected]>

dt-bindings: regulator: act8x: 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/regulator/active-semi,act8600.yaml title: Active-semi ACT8600 regulator · line 13

Quoted 10 lines
Documentation/devicetree/bindings/regulator/active-semi,act8600.yaml +2 -0
index b8ca967bc83d1..49f74a9b1eaab 100644
@@ -9,6 +9,9 @@ title: Active-semi ACT8600 regulator
 maintainers:
   - Paul Cercueil <[email protected]>
 
+allOf:
+  - $ref: /schemas/power/power-controller.yaml#

[Severity: Low]
Does this reference break dt_binding_check?

It appears that /schemas/power/power-controller.yaml does not exist in the tree yet, as only the legacy power-controller.txt is present in Documentation/devicetree/bindings/power/.

Are there missing prerequisite patches for this series?

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

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

Please submit patches using subject lines reflecting the style for the subsystem, this makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing. There's no need to resubmit to fix this alone.