Skip to contentSkip to conversation

dt-bindings: power/supply: sbs-manager: Add missing unevaluatedProperties on child node schemas

PATCH Applied Rob Herring 3 participants 3 messages Sep 26, 2023 – Sep 30, 2023

Subsystems (2)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: power/supply: sbs-manager: Add missing unevaluatedProperties on child node schemas

Just as unevaluatedProperties or additionalProperties are required at the top level of schemas, they should (and will) also be required for child node schemas. That ensures only documented properties are present for any node.

Add unevaluatedProperties as needed, and then add any missing properties flagged by the addition.

---
 .../devicetree/bindings/power/supply/sbs,sbs-manager.yaml   | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/power/supply/sbs,sbs-manager.yaml +6 -0
index f255f3858d08..2e21846463ba 100644
@@ -47,6 +47,12 @@ patternProperties:
   "^i2c@[1-4]$":
     type: object
     $ref: /schemas/i2c/i2c-controller.yaml#
+    unevaluatedProperties: false
+
+    properties:
+      reg:
+        minimum: 1
+        maximum: 4
 
 examples:
   - |
Signature · 1 line
2.40.1
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Rob Herring

Just as unevaluatedProperties or additionalProperties are required at the top level of schemas, they should (and will) also be required for child node schemas. That ensures only documented properties are present for any node.

Add unevaluatedProperties as needed, and then add any missing properties flagged by the addition.

Thanks,
Conor.

Quoted 24 lines
---
 .../devicetree/bindings/power/supply/sbs,sbs-manager.yaml   | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/power/supply/sbs,sbs-manager.yaml +6 -0
index f255f3858d08..2e21846463ba 100644
@@ -47,6 +47,12 @@ patternProperties:
   "^i2c@[1-4]$":
     type: object
     $ref: /schemas/i2c/i2c-controller.yaml#
+    unevaluatedProperties: false
+
+    properties:
+      reg:
+        minimum: 1
+        maximum: 4
 
 examples:
   - |
Signature · 1 line
2.40.1
#2 lore raw
In reply to Rob Herring
Quoted 9 lines · Rob Herring

Just as unevaluatedProperties or additionalProperties are required at the top level of schemas, they should (and will) also be required for child node schemas. That ensures only documented properties are present for any node.

Add unevaluatedProperties as needed, and then add any missing properties flagged by the addition.

[...]

Applied, thanks!

[1/1] dt-bindings: power/supply: sbs-manager: Add missing unevaluatedProperties on child node schemas

      commit: 15a4e422f3c9b041261b6810c90ce09d4ebe2a14

Best regards,

Signature · 1 line
Sebastian Reichel <[email protected]>