[PATCH] usb: gadget: Move USB_GADGET_DUALSPEED to be slightly more visible

Tom Rini trini at konsulko.com
Fri Mar 20 14:53:05 CET 2026


On Thu, Mar 19, 2026 at 06:57:21PM +0100, Marek Vasut wrote:
> On 3/19/26 2:39 PM, Tom Rini wrote:
> > On Thu, Mar 19, 2026 at 01:50:56AM +0100, Marek Vasut wrote:
> > > On 3/18/26 2:26 AM, Tom Rini wrote:
> > > > On Tue, Mar 17, 2026 at 08:42:06PM +0100, Marek Vasut wrote:
> > > > > On 3/17/26 2:41 PM, Tom Rini wrote:
> > > > > > On Tue, Mar 17, 2026 at 03:34:36AM +0100, Marek Vasut wrote:
> > > > > > > On 3/17/26 2:24 AM, Tom Rini wrote:
> > > > > > > > As exposed by "make randconfig", we have an issue around
> > > > > > > > USB_GADGET_DUALSPEED. It is possible to select this symbol (via
> > > > > > > > SPL_USB_CDNS3_GADGET for example) and so have an unmet dependency. As
> > > > > > > > this is a hidden symbol, move it up within the menu.
> > > > > > > What is the issue this is fixing ?
> > > > > > 
> > > > > > Valid configs causing the kconfig part of the build system to note
> > > > > > unmet dependencies.
> > > > > Lemme rephrase, is this actually a fix, or is this some readability/ordering
> > > > > improvement patch ?
> > > > 
> > > > Yes, it's a fix because randconfig finds problems that users may stumble
> > > > on to while trying to make a valid config for a platform.
> > > 
> > > Is the commit message telling me, that "config USB_GADGET_DUALSPEED" is
> > > moved outside of the "if USB_GADGET" block ?
> > > 
> > > Because if this is something else, and the symbols are simply reordered,
> > > that I do not understand how this could be fixing anything.
> > 
> > I'm unclear what else you need to know to take this bugfix. The symbol
> > is not placed correctly, leading to possibly unmet dependency errors.
> 
> Why do you think the symbol is placed incorrectly ?

Because we wouldn't get a Kconfig unmet dependency error if it was
correctly placed.

> What this change does, is it moves "config USB_GADGET_DUALSPEED" outside of
> the "if USB_GADGET" block in drivers/usb/gadget/Kconfig , which the commit
> message should clearly spell out.

I could reword "As this is a hidden symbol, move it up within the menu."
more, sure.

> However , I believe that is not the correct fix. The USB_GADGET_DUALSPEED
> has to be available only if USB_GADGET or SPL_USB_GADGET is selected, the
> former is already satisfied, the later is not and the SPL_USB_CDNS3_GADGET
> triggers a problem here. I think this is the correct fix:
> 
> "
> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index ebb306852a6..87d17780c45 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -178,10 +178,6 @@ config SDP_LOADADDR
>         hex "Default load address at SDP_WRITE and SDP_JUMP"
>         default 0x0
> 
> -# Selected by UDC drivers that support high-speed operation.
> -config USB_GADGET_DUALSPEED
> -       bool
> -
>  config USB_GADGET_DOWNLOAD
>         bool "Enable USB download gadget"
>         help
> @@ -371,3 +367,11 @@ config SPL_SDP_USB_DEV
>           so it can be used in compiled environment.
> 
>  endif # SPL_USB_GADGET
> +
> +if USB_GADGET || SPL_USB_GADGET
> +
> +# Selected by UDC drivers that support high-speed operation.
> +config USB_GADGET_DUALSPEED
> +       bool
> +
> +endif
> "

You don't need to guard hidden symbols. But this also probably also
works, so yes, please post that as a proper patch and I'll go Changes
Requested mine.

> > Yes, the error is discovered by randconfig which makes it harder to
> > describe how exactly to reproduce it (but I believe it does), but that
> > doesn't make it any less valid.
> This part is not relevant.

Well it's been unclear to me what you do and don't see as a valid
problem with this and the other patch.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260320/cca3f124/attachment.sig>


More information about the U-Boot mailing list