From: "Rob Herring (Arm)" <robh@kernel.org>
To: Quentin Schulz <foss+kernel@0leil.net>
Cc: devicetree@vger.kernel.org, "Conor Dooley" <conor+dt@kernel.org>,
"Łukasz Czechowski" <lukasz.czechowski@thaumatec.com>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Quentin Schulz" <quentin.schulz@cherry.de>
Subject: Re: [PATCH v2] dt-bindings: usb: usb-device: relax compatible pattern to a contains
Date: Wed, 23 Apr 2025 10:24:43 -0500 [thread overview]
Message-ID: <174542188274.551504.11808715673086067536.robh@kernel.org> (raw)
In-Reply-To: <20250418-dt-binding-usb-device-compatibles-v2-1-b3029f14e800@cherry.de>
On Fri, 18 Apr 2025 16:08:20 +0200, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> 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>
> ---
> This came up while working on fixing USB on an RK3399 Puma which has an
> onboard USB hub whose productID isn't in any driver compatible list
> but which can be supported by a driver with a slightly different
> productID matching another variant of the same IC, from the same
> datasheet.
>
> See https://lore.kernel.org/linux-rockchip/20250326-onboard_usb_dev-v1-0-a4b0a5d1b32c@thaumatec.com/
> ---
> Changes in v2:
> - use contains: instead of pattern: to relax the check, similarly to
> what's done for PCI (suggested by Rob),
> - Link to v1: https://lore.kernel.org/r/20250415-dt-binding-usb-device-compatibles-v1-1-90f3cff32aa0@cherry.de
> ---
> Documentation/devicetree/bindings/usb/usb-device.yaml | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
prev parent reply other threads:[~2025-04-23 15:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 14:08 Quentin Schulz
2025-04-23 15:24 ` Rob Herring (Arm) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=174542188274.551504.11808715673086067536.robh@kernel.org \
--to=robh@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=foss+kernel@0leil.net \
--cc=gregkh@linuxfoundation.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=lukasz.czechowski@thaumatec.com \
--cc=quentin.schulz@cherry.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®