]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
dt-bindings: usb: qcom,snps-dwc3: Add missing clocks and interrupts constraints
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Mon, 23 Mar 2026 08:54:13 +0000 (09:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Mar 2026 14:54:12 +0000 (16:54 +0200)
The top-level part defines variable number of clocks and interrupts, and
each "if:then:" block narrows them.  It however narrows only the
maxItems leaving minItems undefined, which then takes different values
depending on dtschema being used.

Recommended style is to avoid ambiguity in such case, thus if top-level
part has broad constraints, then each "if:then:" must specify both upper
and lower limits.

Add missing constraints, mostly minItems but also maxItems for one
variant.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20260323-dt-bindings-snps-qcom-dwc3-cleanup-v2-2-3bcd37c0a5b5@oss.qualcomm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml

index 14d721857ffc5103052e3ca8c72b959ad405cb85..7dca8be66ef1ff3090798277bf1df37c51005bcf 100644 (file)
@@ -174,6 +174,7 @@ allOf:
     then:
       properties:
         clocks:
+          minItems: 3
           maxItems: 3
         clock-names:
           items:
@@ -221,6 +222,7 @@ allOf:
     then:
       properties:
         clocks:
+          minItems: 5
           maxItems: 5
         clock-names:
           items:
@@ -263,6 +265,7 @@ allOf:
     then:
       properties:
         clocks:
+          minItems: 4
           maxItems: 4
         clock-names:
           items:
@@ -282,6 +285,7 @@ allOf:
     then:
       properties:
         clocks:
+          minItems: 4
           maxItems: 4
         clock-names:
           items:
@@ -302,6 +306,7 @@ allOf:
     then:
       properties:
         clocks:
+          minItems: 9
           maxItems: 9
         clock-names:
           items:
@@ -363,6 +368,7 @@ allOf:
       properties:
         clocks:
           minItems: 6
+          maxItems: 6
         clock-names:
           items:
             - const: cfg_noc
@@ -404,6 +410,7 @@ allOf:
     then:
       properties:
         clocks:
+          minItems: 7
           maxItems: 7
         clock-names:
           items:
@@ -472,6 +479,7 @@ allOf:
     then:
       properties:
         interrupts:
+          minItems: 4
           maxItems: 4
         interrupt-names:
           items: