regulator: dt-bindings: Add missing (unevaluated|additional)Properties on child nodes
authorRob Herring <robh@kernel.org>
Tue, 23 Aug 2022 14:56:38 +0000 (09:56 -0500)
committerMark Brown <broonie@kernel.org>
Tue, 23 Aug 2022 16:34:08 +0000 (17:34 +0100)
In order to ensure only documented properties are present, node schemas
must have unevaluatedProperties or additionalProperties set to false
(typically).

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220823145649.3118479-7-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Documentation/devicetree/bindings/regulator/dlg,da9121.yaml
Documentation/devicetree/bindings/regulator/maxim,max77802.yaml
Documentation/devicetree/bindings/regulator/maxim,max8997.yaml
Documentation/devicetree/bindings/regulator/mt6315-regulator.yaml
Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml
Documentation/devicetree/bindings/regulator/qcom-labibb-regulator.yaml
Documentation/devicetree/bindings/regulator/richtek,rt4801-regulator.yaml
Documentation/devicetree/bindings/regulator/rohm,bd71815-regulator.yaml

index 24ace6e1e5ec6f0d7bff605a8d828e72707218b2..63e1161a87dee09c9c08fb1d8d9f24842f24fd1e 100644 (file)
@@ -83,6 +83,7 @@ properties:
 
   regulators:
     type: object
+    additionalProperties: false
     description: |
       List of regulators provided by the device
 
index 236348c4710c9d9d3122ee843d3726ae1fef96e6..71138c611b6cf26958b1f8c3ac586e706a79772c 100644 (file)
@@ -79,6 +79,7 @@ patternProperties:
     patternProperties:
       regulator-state-(standby|mem|disk):
         type: object
+        additionalProperties: true
         properties:
           regulator-mode: false
 
index 4321f061a7f6249c407db73c1091d1a7b13cffc0..2b266ea43716471e7761689c52799817778ed554 100644 (file)
@@ -111,6 +111,7 @@ properties:
 
   regulators:
     type: object
+    additionalProperties: false
     description:
       List of child nodes that specify the regulators.
 
index 37402c370fbbc87963126f8b67aad4f26164c360..364b58730be2ba39523f8702abd5da3e026d6f8a 100644 (file)
@@ -29,6 +29,7 @@ properties:
       "^vbuck[1-4]$":
         type: object
         $ref: "regulator.yaml#"
+        unevaluatedProperties: false
 
         properties:
           regulator-compatible:
index 8b7c4af4b5517e06a95b87765a6a5ed04638a31f..3266cd0c580fd763dc74f52756af497e0bf5616a 100644 (file)
@@ -35,6 +35,7 @@ patternProperties:
     description: List of regulators and its properties
     type: object
     $ref: regulator.yaml#
+    unevaluatedProperties: false
 
     properties:
       qcom,ocp-max-retries:
index 1ddc1efd19e29ea17cfd0ee5985b313bca70830c..f97b8083678f22a44a1758810a470cba8c180ffc 100644 (file)
@@ -20,6 +20,7 @@ properties:
 
   lab:
     type: object
+    additionalProperties: false
 
     properties:
       qcom,soft-start-us:
@@ -33,11 +34,19 @@ properties:
         description:
           Short-circuit and over-current interrupts for lab.
 
+      interrupt-names:
+        minItems: 1
+        items:
+          - const: sc-err
+          - const: ocp
+
     required:
       - interrupts
+      - interrupt-names
 
   ibb:
     type: object
+    additionalProperties: false
 
     properties:
       qcom,discharge-resistor-kohms:
@@ -52,8 +61,15 @@ properties:
         description:
           Short-circuit and over-current interrupts for ibb.
 
+      interrupt-names:
+        minItems: 1
+        items:
+          - const: sc-err
+          - const: ocp
+
     required:
       - interrupts
+      - interrupt-names
 
 required:
   - compatible
index 091150c4e5795b401ddc02d70779277bb2e25f22..4a8a221bc9027af18220b3d0124dd818e3a1d304 100644 (file)
@@ -42,6 +42,7 @@ patternProperties:
   "^DSV(P|N)$":
     type: object
     $ref: regulator.yaml#
+    unevaluatedProperties: false
     description:
       Properties for single display bias regulator.
 
index 7d0adb74a396a39493e25bb0d940eff5a22cd8f8..d61e8675f0672af651835b44ef378d5c93818a60 100644 (file)
@@ -27,6 +27,7 @@ properties:
     description:
       properties for wled regulator
     $ref: regulator.yaml#
+    unevaluatedProperties: false
 
     properties:
       regulator-name: