* [PATCH] dt-bindings: usb: qcom,snps-dwc3: Add missing clock constraints
@ 2026-03-19 9:23 Krzysztof Kozlowski
2026-03-23 8:38 ` Krzysztof Kozlowski
0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-19 9:23 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Wesley Cheng, linux-arm-msm, linux-usb, devicetree,
linux-kernel
Cc: Krzysztof Kozlowski
The top-level part defines variable number of clocks 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>
---
Apologies for sending two patches for the same file one after another as
independent work. I do drive-by fixes when doing reviews and usually
post such fix immediately.
---
Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
index 2b6a0939d98d..cddc88e2bad2 100644
--- a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
@@ -173,6 +173,7 @@ allOf:
then:
properties:
clocks:
+ minItems: 3
maxItems: 3
clock-names:
items:
@@ -220,6 +221,7 @@ allOf:
then:
properties:
clocks:
+ minItems: 5
maxItems: 5
clock-names:
items:
@@ -262,6 +264,7 @@ allOf:
then:
properties:
clocks:
+ minItems: 4
maxItems: 4
clock-names:
items:
@@ -281,6 +284,7 @@ allOf:
then:
properties:
clocks:
+ minItems: 4
maxItems: 4
clock-names:
items:
@@ -301,6 +305,7 @@ allOf:
then:
properties:
clocks:
+ minItems: 9
maxItems: 9
clock-names:
items:
@@ -361,6 +366,7 @@ allOf:
properties:
clocks:
minItems: 6
+ maxItems: 6
clock-names:
items:
- const: cfg_noc
@@ -402,6 +408,7 @@ allOf:
then:
properties:
clocks:
+ minItems: 7
maxItems: 7
clock-names:
items:
--
2.51.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] dt-bindings: usb: qcom,snps-dwc3: Add missing clock constraints
2026-03-19 9:23 [PATCH] dt-bindings: usb: qcom,snps-dwc3: Add missing clock constraints Krzysztof Kozlowski
@ 2026-03-23 8:38 ` Krzysztof Kozlowski
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-23 8:38 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Wesley Cheng, linux-arm-msm, linux-usb, devicetree,
linux-kernel
On 19/03/2026 10:23, Krzysztof Kozlowski wrote:
> The top-level part defines variable number of clocks 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>
>
> ---
>
> Apologies for sending two patches for the same file one after another as
> independent work. I do drive-by fixes when doing reviews and usually
> post such fix immediately.
I looked at Sashiko review of this patch and it nicely spotted more
issues in the original code (not my patch), so I will have more patches.
I will organize all of them into one patchset, so there will be v2 of this.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-23 8:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-19 9:23 [PATCH] dt-bindings: usb: qcom,snps-dwc3: Add missing clock constraints Krzysztof Kozlowski
2026-03-23 8:38 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®