dt-bindings: mfd: Add missing unevaluatedProperties on child node schemas
authorRob Herring <robh@kernel.org>
Mon, 25 Sep 2023 21:27:24 +0000 (16:27 -0500)
committerLee Jones <lee@kernel.org>
Wed, 1 Nov 2023 10:02:13 +0000 (10:02 +0000)
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.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230925212729.1976117-1-robh@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
Documentation/devicetree/bindings/mfd/maxim,max5970.yaml
Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml
Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml
Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml
Documentation/devicetree/bindings/mfd/ti,lp87524-q1.yaml
Documentation/devicetree/bindings/mfd/ti,lp87561-q1.yaml
Documentation/devicetree/bindings/mfd/ti,lp87565-q1.yaml

index da67742c5aa9471eccc1a115027eede9a700c07d..0da5cae3852e0cddca5cdfe6be01a62be84f3469 100644 (file)
@@ -45,8 +45,13 @@ properties:
     patternProperties:
       "^led@[0-3]$":
         $ref: /schemas/leds/common.yaml#
+        unevaluatedProperties: false
         type: object
 
+        properties:
+          reg:
+            maximum: 3
+
     additionalProperties: false
 
   vss1-supply:
index fc2a53148e1cbbb824e9bd9a67237e6e3e91dcb4..37423c2e0fdfa32d955092d448a4068751ffa319 100644 (file)
@@ -40,6 +40,7 @@ properties:
   regulators:
     type: object
     $ref: /schemas/regulator/mediatek,mt6357-regulator.yaml
+    unevaluatedProperties: false
     description:
       List of MT6357 BUCKs and LDOs regulators.
 
@@ -59,6 +60,7 @@ properties:
   keys:
     type: object
     $ref: /schemas/input/mediatek,pmic-keys.yaml
+    unevaluatedProperties: false
     description:
       MT6357 power and home keys.
 
index 4992f71b6fc3f0eab8ed596b7af53942c1ac8e26..af6cd1969c226fbf9ffde527fafe2cf9920e07ea 100644 (file)
@@ -80,6 +80,7 @@ properties:
       "^(DCDC_REG[1-4]|LDO_REG[1-3])$":
         type: object
         $ref: ../regulator/regulator.yaml#
+        unevaluatedProperties: false
     unevaluatedProperties: false
 
 allOf:
index f5908fa01a61af063604ef199f6711a8512a891f..8a16d651c2a310677b13a44ddfcf3601e46e5bbd 100644 (file)
@@ -107,6 +107,7 @@ properties:
       "^(DCDC_REG[1-4]|LDO_REG[1-8]|SWITCH_REG[1-2])$":
         type: object
         $ref: ../regulator/regulator.yaml#
+        unevaluatedProperties: false
     unevaluatedProperties: false
 
 required:
index 7fb849ac74a7cddb7832c7393b7c70290eaa08ad..e922e0176ee7fac9b5015db1a4d8c21855c1180e 100644 (file)
@@ -86,7 +86,8 @@ properties:
     patternProperties:
       "^(LDO_REG[1-9]|DCDC_REG[1-5]|SWITCH_REG[1-2])$":
         type: object
-        $ref: ../regulator/regulator.yaml#
+        $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
     unevaluatedProperties: false
 
 allOf:
index b57c4b005cf455882dc644d1e4299b185f78b114..ee5bca6e75dface3d3fa78896c04f303254489e5 100644 (file)
@@ -99,6 +99,7 @@ properties:
       "^(DCDC_REG[1-4]|DCDC_BOOST|LDO_REG[1-9]|SWITCH_REG|HDMI_SWITCH|OTG_SWITCH)$":
         type: object
         $ref: ../regulator/regulator.yaml#
+        unevaluatedProperties: false
     unevaluatedProperties: false
 
 required:
index f6cac4b1079c9a56f314fe639d836e6dc88f86f4..ae149eb8593dcfdd28169602525acfde5ed1a19e 100644 (file)
@@ -37,6 +37,7 @@ properties:
       "^buck[0123]$":
         type: object
         $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
 
     required:
       - buck0
index dc5a29b5ef7d90967e2ae3a606c4e4f6fc43654a..5167d6eb904a139d73ce8a561a8045bd7b988759 100644 (file)
@@ -41,6 +41,7 @@ properties:
       buck3210:
         type: object
         $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
 
     required:
       - buck3210
index 012d25111054c4065b712fea07d4ef08b41b21ce..eca430edf608eb2595493f676e16f50cf622f0ce 100644 (file)
@@ -47,6 +47,7 @@ properties:
       "^buck(10|23)$":
         type: object
         $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
 
     required:
       - buck10