* [PATCH] dt-bindings: usb: genesys,gl850g: allow downstream device subnodes
@ 2024-09-17 9:40 Icenowy Zheng
2024-09-17 10:43 ` Krzysztof Kozlowski
0 siblings, 1 reply; 2+ messages in thread
From: Icenowy Zheng @ 2024-09-17 9:40 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-usb, devicetree, linux-kernel, Icenowy Zheng
As this binding describes USB hubs, it's natural for them to have
downstream devices.
Change "additionalProperties" to "unevaluatedProperties" to allow
properties defined in usb-device.yaml (for DT cells properties) and add
a pattern-based downstream device subnode rule to match those subnodes.
These changes allow downstream devices get defined under the hub.
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
---
This patch is sent to fix the problems shown for the patchset at [1],
which declares a MAC-address-less ethernet adapter subnode of the GL850G
to have its MAC address set from the bootloader.
[1] https://lore.kernel.org/linux-arm-kernel/172623730520.4076253.7175037716930825765.robh@kernel.org/
.../devicetree/bindings/usb/genesys,gl850g.yaml | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
index fc833363cfb49..6fe2d356dcbde 100644
--- a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
+++ b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
@@ -62,7 +62,14 @@ allOf:
peer-hub: true
vdd-supply: true
-additionalProperties: false
+patternProperties:
+ "^.*@[0-9a-f]{1,2}$":
+ description: The hard wired USB devices
+ type: object
+ $ref: /schemas/usb/usb-device.yaml
+ additionalProperties: true
+
+unevaluatedProperties: false
examples:
- |
--
2.46.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dt-bindings: usb: genesys,gl850g: allow downstream device subnodes
2024-09-17 9:40 [PATCH] dt-bindings: usb: genesys,gl850g: allow downstream device subnodes Icenowy Zheng
@ 2024-09-17 10:43 ` Krzysztof Kozlowski
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2024-09-17 10:43 UTC (permalink / raw)
To: Icenowy Zheng, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-usb, devicetree, linux-kernel
On 17/09/2024 11:40, Icenowy Zheng wrote:
> As this binding describes USB hubs, it's natural for them to have
> downstream devices.
>
> Change "additionalProperties" to "unevaluatedProperties" to allow
> properties defined in usb-device.yaml (for DT cells properties) and add
> a pattern-based downstream device subnode rule to match those subnodes.
>
> These changes allow downstream devices get defined under the hub.
>
> Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-17 10:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-17 9:40 [PATCH] dt-bindings: usb: genesys,gl850g: allow downstream device subnodes Icenowy Zheng
2024-09-17 10:43 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).