Skip to contentSkip to conversation

dt-bindings: Fix erroneous 'additionalProperties'

PATCH In review Rob Herring 3 participants 3 messages Apr 24, 2020 – Apr 27, 2020

Subsystems (4)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: Fix erroneous 'additionalProperties'

There's several cases of json-schema 'additionalProperties' at the wrong indentation level which has the effect of making them DT properties. This is harmless, but let's fix them so a meta-schema check for this can be added.

In all the cases, either the 'additionalProperties' was extra or doesn't work because there's a $ref to more properties. In the latter case, we can use 'unevaluatedProperties' instead.

Cc Lee Jones <[email protected]>
Cc Saravanan Sekar <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
---
 Documentation/devicetree/bindings/mfd/st,stpmic1.yaml       | 2 --
 Documentation/devicetree/bindings/regulator/mps,mp5416.yaml | 1 -
 .../devicetree/bindings/regulator/mps,mpq7920.yaml          | 3 ++-
 .../bindings/regulator/rohm,bd71828-regulator.yaml          | 6 +++++-
 .../bindings/regulator/rohm,bd71837-regulator.yaml          | 6 +++++-
 .../bindings/regulator/rohm,bd71847-regulator.yaml          | 6 +++++-
 6 files changed, 17 insertions(+), 7 deletions(-)
Documentation/devicetree/bindings/mfd/st,stpmic1.yaml +0 -2
index f88d13d70441..be7faa6dc055 100644
@@ -259,8 +259,6 @@ properties:
 
     additionalProperties: false
 
-  additionalProperties: false
-
 additionalProperties: false
 
 required:
Documentation/devicetree/bindings/regulator/mps,mp5416.yaml +0 -1
index f0acce2029fd..3b019fa6db31 100644
@@ -37,7 +37,6 @@ properties:
         type: object
 
     additionalProperties: false
-  additionalProperties: false
 
 required:
   - compatible
Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml +2 -1
index a682af0dc67e..ae6e7ab36c58 100644
@@ -75,7 +75,8 @@ properties:
             description: |
               disables over voltage protection of this buck
 
-      additionalProperties: false
+        unevaluatedProperties: false
+
     additionalProperties: false
 
 required:
Documentation/devicetree/bindings/regulator/rohm,bd71828-regulator.yaml +5 -1
index 71ce032b8cf8..1e52dafcb5c9 100644
@@ -35,6 +35,8 @@ patternProperties:
         description:
           should be "ldo1", ..., "ldo7"
 
+    unevaluatedProperties: false
+
   "^BUCK[1-7]$":
     type: object
     allOf:
@@ -103,5 +105,7 @@ patternProperties:
 
     required:
       - regulator-name
-  additionalProperties: false
+
+    unevaluatedProperties: false
+
 additionalProperties: false
Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.yaml +5 -1
index a323b1696eee..543d4b52397e 100644
@@ -41,6 +41,8 @@ patternProperties:
         description:
           should be "ldo1", ..., "ldo7"
 
+    unevaluatedProperties: false
+
   "^BUCK[1-8]$":
     type: object
     allOf:
@@ -99,5 +101,7 @@ patternProperties:
 
     required:
       - regulator-name
-  additionalProperties: false
+
+    unevaluatedProperties: false
+
 additionalProperties: false
Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml +5 -1
index 526fd00bcb16..d797cc23406f 100644
@@ -40,6 +40,8 @@ patternProperties:
         description:
           should be "ldo1", ..., "ldo6"
 
+    unevaluatedProperties: false
+
   "^BUCK[1-6]$":
     type: object
     allOf:
@@ -93,5 +95,7 @@ patternProperties:
 
     required:
       - regulator-name
-  additionalProperties: false
+
+    unevaluatedProperties: false
+
 additionalProperties: false
Signature · 1 line
2.20.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Rob Herring

There's several cases of json-schema 'additionalProperties' at the wrong indentation level which has the effect of making them DT properties. This is harmless, but let's fix them so a meta-schema check for this can be added.

Acked-by on v1 1/1
#2 lore raw
In reply to Rob Herring
Quoted 9 lines · Rob Herring

There's several cases of json-schema 'additionalProperties' at the wrong indentation level which has the effect of making them DT properties. This is harmless, but let's fix them so a meta-schema check for this can be added.

In all the cases, either the 'additionalProperties' was extra or doesn't work because there's a $ref to more properties. In the latter case, we can use 'unevaluatedProperties' instead.

Quoted 8 lines
Cc Lee Jones <[email protected]>
Cc Saravanan Sekar <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
---
 Documentation/devicetree/bindings/mfd/st,stpmic1.yaml       | 2 --
Quoted 6 lines
 Documentation/devicetree/bindings/regulator/mps,mp5416.yaml | 1 -
 .../devicetree/bindings/regulator/mps,mpq7920.yaml          | 3 ++-
 .../bindings/regulator/rohm,bd71828-regulator.yaml          | 6 +++++-
 .../bindings/regulator/rohm,bd71837-regulator.yaml          | 6 +++++-
 .../bindings/regulator/rohm,bd71847-regulator.yaml          | 6 +++++-
 6 files changed, 17 insertions(+), 7 deletions(-)
Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog