Properties should be described only once, thus having separate pattern
for children just to specify the $ref to regulator.yaml is not correct.
It also makes impossible to finish it with
additional/unevaluatedProperties:false to restrict allowed properties in
regulator node.
Merge the patterns, so each regulator subnode has regulator.yaml $ref,
additional properties and ends with additionalProperties:false. This
points to missing regulator-min/max-microvolt in LDO4 node.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
Changes in v3:
1. Add regulator-min/max-microvolt in ldo4
Changes in v2:
1. Merge the entries instead of duplicating regulator properties.
---
.../devicetree/bindings/mfd/st,stpmic1.yaml | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml b/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml
index 97c61097f9e2..b17ebeb0a42f 100644
--- a/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml
+++ b/Documentation/devicetree/bindings/mfd/st,stpmic1.yaml
@@ -106,6 +106,7 @@ properties:
const: st,stpmic1-regulators
ldo3:
+ $ref: /schemas/regulator/regulator.yaml
type: object
properties:
@@ -128,6 +129,7 @@ properties:
additionalProperties: false
ldo4:
+ $ref: /schemas/regulator/regulator.yaml
type: object
properties:
@@ -142,11 +144,14 @@ properties:
regulator-name: true
regulator-boot-on: true
regulator-always-on: true
+ regulator-min-microvolt: true
+ regulator-max-microvolt: true
regulator-over-current-protection: true
additionalProperties: false
vref_ddr:
+ $ref: /schemas/regulator/regulator.yaml
type: object
properties:
@@ -165,6 +170,7 @@ properties:
additionalProperties: false
boost:
+ $ref: /schemas/regulator/regulator.yaml
type: object
properties:
@@ -187,10 +193,8 @@ properties:
"^(buck[1-4]|ldo[1-6]|vref_ddr|boost|pwr_sw[1-2])-supply$":
description: STPMIC1 voltage regulators supplies
- "^(buck[1-4]|ldo[1-6]|boost|vref_ddr|pwr_sw[1-2])$":
- $ref: ../regulator/regulator.yaml
-
"^ldo[1-2,5-6]$":
+ $ref: /schemas/regulator/regulator.yaml
type: object
properties:
@@ -213,6 +217,7 @@ properties:
additionalProperties: false
"^buck[1-4]$":
+ $ref: /schemas/regulator/regulator.yaml
type: object
properties:
@@ -237,6 +242,7 @@ properties:
additionalProperties: false
"^pwr_sw[1-2]$":
+ $ref: /schemas/regulator/regulator.yaml
type: object
properties:
--
2.34.1
On Wed, 26 Jul 2023 08:56:32 +0200, Krzysztof Kozlowski wrote:
> Properties should be described only once, thus having separate pattern
> for children just to specify the $ref to regulator.yaml is not correct.
> It also makes impossible to finish it with
> additional/unevaluatedProperties:false to restrict allowed properties in
> regulator node.
>
> Merge the patterns, so each regulator subnode has regulator.yaml $ref,
> additional properties and ends with additionalProperties:false. This
> points to missing regulator-min/max-microvolt in LDO4 node.
>
> [...]
Applied, thanks!
[1/2] dt-bindings: mfd: st,stpmic1: Merge patterns for nodes
commit: 36392f2ca024765039fa45fc5b085210998ffc7a
[2/2] dt-bindings: mfd: stericsson,db8500-prcmu: Add missing unevaluatedProperties for each regulator
commit: 3d2b5d02738ee802f44f3f9c6ae8932e548188d6
--
Lee Jones [李琼斯]