]> git.ipfire.org Git - thirdparty/u-boot.git/commit
dt-bindings: usb: usb-device: relax compatible pattern to a contains
authorQuentin Schulz <quentin.schulz@cherry.de>
Wed, 30 Jul 2025 11:10:18 +0000 (13:10 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 30 Jul 2025 14:23:00 +0000 (08:23 -0600)
commit7c0491ccc6a772a13b326b76a47cb6b3cc5e3f7f
tree5bc41afe9bcf738cc4e18b4f6efb0f80ab7e95a4
parent7810d079adfa7bc7b73085896d3a00d736b5cafb
dt-bindings: usb: usb-device: relax compatible pattern to a contains

The dt-core typically allows multiple compatibles[1] but usb-device
currently forces a single compatible.

This is an issue when multiple devices with slightly different productID
all behave the same. This would require the driver to keep updating its
compatible matching table to include this new productID instead of doing
what is usually done: have two compatibles, the leftmost which matches
exactly the HW device definition, and the rightmost one as a fallback
which is assumed to be 100% compatible with the device at hand. If this
assumption turns out to be wrong, it is easy to work around this without
having to modify the device tree by handling the leftmost compatible in the driver.

[1] https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/dt-core.yaml#L21-L25

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250418-dt-binding-usb-device-compatibles-v2-1-b3029f14e800@cherry.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ upstream commit: 495df45f38c8ba3d74c3180a0a13a0ecbfa717d1 ]

(cherry picked from commit 932da7a8df7b6b43453d640b383d0076d5a7d9a5)
dts/upstream/Bindings/usb/usb-device.yaml