dt-bindings: usb: Add missing (unevaluated|additional)Properties on child nodes
authorRob Herring <robh@kernel.org>
Tue, 23 Aug 2022 14:56:40 +0000 (09:56 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2022 07:07:52 +0000 (09:07 +0200)
In order to ensure only documented properties are present, node schemas
must have unevaluatedProperties or additionalProperties set to false
(typically).

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220823145649.3118479-9-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/usb/analogix,anx7411.yaml
Documentation/devicetree/bindings/usb/aspeed,usb-vhub.yaml
Documentation/devicetree/bindings/usb/st,stusb160x.yaml
Documentation/devicetree/bindings/usb/willsemi,wusb3801.yaml

index ee436308e5dc2c0d64861d8dd5a3eb60bbefea92..0e72c08e65665cc608e135d428f9cea6cf605651 100644 (file)
@@ -23,6 +23,8 @@ properties:
   connector:
     type: object
     $ref: ../connector/usb-connector.yaml
+    unevaluatedProperties: false
+
     description:
       Properties for usb c connector.
 
index 8b019ac05bbe0dfb1096fa60b857ed848682d14f..a86bcd95100eb3e3968df0dd042069e120ad455c 100644 (file)
@@ -67,6 +67,7 @@ properties:
 
   vhub-strings:
     type: object
+    additionalProperties: false
 
     properties:
       '#address-cells':
@@ -78,6 +79,7 @@ properties:
     patternProperties:
       '^string@[0-9a-f]+$':
         type: object
+        additionalProperties: false
         description: string descriptors of the specific language
 
         properties:
index b5a8c9814dd3e865b059ccc95584439533fcb69f..b8974807b666de2092531883538504e52da2603b 100644 (file)
@@ -33,6 +33,7 @@ properties:
   connector:
     type: object
     $ref: /schemas/connector/usb-connector.yaml#
+    unevaluatedProperties: false
 
     properties:
       compatible:
@@ -74,9 +75,14 @@ examples:
                 data-role = "dual";
                 typec-power-opmode = "default";
 
-                port {
-                    typec_con_ep: endpoint {
-                        remote-endpoint = <&usbotg_hs_ep>;
+                ports {
+                    #address-cells = <1>;
+                    #size-cells = <0>;
+                    port@0 {
+                        reg = <0>;
+                        typec_con_ep: endpoint {
+                            remote-endpoint = <&usbotg_hs_ep>;
+                        };
                     };
                 };
             };
index c2b2243c789208397b200e19d1fe74823be2494f..5aa4ffd67119136ed5b2509a21f1e8b8a0b273b8 100644 (file)
@@ -28,6 +28,7 @@ properties:
   connector:
     type: object
     $ref: ../connector/usb-connector.yaml#
+    unevaluatedProperties: false
     description:
       The managed USB Type-C connector. Since WUSB3801 does not support
       Power Delivery, the node should have the "pd-disable" property.