]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
dt-bindings: usb: connector: disallow additional properties
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tue, 25 Jul 2023 10:23:25 +0000 (12:23 +0200)
committerRob Herring <robh@kernel.org>
Thu, 27 Jul 2023 17:08:36 +0000 (11:08 -0600)
USB connector bindings is complete, thus no additional properties should
be allowed.  Add missing 'reg' property and change additionalProperties
to false, so the schema will check for anything unexpected.  This also
allows to drop the 'reg' from other bindings referencing the
usb-connector.yaml and make it required.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230725102325.76336-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Rob Herring <robh@kernel.org>
Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml
Documentation/devicetree/bindings/connector/usb-connector.yaml
Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml
Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml

index 3b0548c347914d860b3dfad233a7a3ff994bd776..9f9816fbecbc850f24ca99d85a3af53528b07640 100644 (file)
@@ -29,10 +29,8 @@ properties:
 patternProperties:
   '^connector@[0-9a-f]+$':
     $ref: /schemas/connector/usb-connector.yaml#
-    unevaluatedProperties: false
-    properties:
-      reg:
-        maxItems: 1
+    required:
+      - reg
 
 required:
   - compatible
index 1c4d3eb877635e005ed2607e3841ba611020fa73..e1b8b8b63120c3514a953c59805275c43ff2c474 100644 (file)
@@ -30,6 +30,9 @@ properties:
           - const: samsung,usb-connector-11pin
           - const: usb-b-connector
 
+  reg:
+    maxItems: 1
+
   label:
     description: Symbolic name for the connector.
 
@@ -264,7 +267,7 @@ anyOf:
         - typec-power-opmode
         - new-source-frs-typec-current
 
-additionalProperties: true
+additionalProperties: false
 
 examples:
   # Micro-USB connector with HS lines routed via controller (MUIC).
index 6440dc801387db748150fe8dc50e9e1d0db20464..bceb479f74c54922fb52ef382c154f3c258eda79 100644 (file)
@@ -38,15 +38,9 @@ properties:
 patternProperties:
   '^connector@\d$':
     $ref: /schemas/connector/usb-connector.yaml#
-
-    properties:
-      reg: true
-
     required:
       - reg
 
-    unevaluatedProperties: false
-
 required:
   - compatible
 
index 75eec4a9a020cf30afd6884ecd60fa09de31cc94..89fc9a434d05f413ea62c374c10c23f1df313b8a 100644 (file)
@@ -43,10 +43,8 @@ properties:
 patternProperties:
   '^connector@[01]$':
     $ref: /schemas/connector/usb-connector.yaml#
-    unevaluatedProperties: false
-    properties:
-      reg:
-        maxItems: 1
+    required:
+      - reg
 
 required:
   - compatible