All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Zixun LI <admin@hifiphile.com>, Simon Glass <sjg@chromium.org>,
	Tom Rini <trini@konsulko.com>, Lukasz Majewski <lukma@denx.de>,
	Marek Vasut <marex@denx.de>
Cc: Zixun LI <admin@hifiphile.com>, u-boot@lists.denx.de
Subject: Re: [PATCH] usb: gadget: udc: Fix duplicate uclass name
Date: Wed, 07 Aug 2024 09:07:20 +0200	[thread overview]
Message-ID: <87frrgolp3.fsf@baylibre.com> (raw)
In-Reply-To: <20240802092820.917450-1-admin@hifiphile.com>

Hi Zixun,

Thank you for the patch.

On ven., août 02, 2024 at 11:28, Zixun LI <admin@hifiphile.com> wrote:

> Currently both USB host uclass and USB gadget uclass are using the same
> name "usb" which break uclass functions like uclass_get_by_name().
>
> Rename the uclass to "usb_gadget" to fix, also makes bind/unbind by class
> index (or sequence) working.
>
> This breaks the capacity of using "usb" as DT alias sequence numbering
> which needs a fix afterwards.

Have you identified boards which use the DT alias that will break
with this patch?

Maybe we can detail the required fix in the commit message a bit as well?
Or, if you know of a board that uses "usb" as DT alias sequence number,
we can submit a fix alongside with this one to document the fix.

>
> Signed-off-by: Zixun LI <admin@hifiphile.com>
> ---
>  drivers/usb/gadget/udc/udc-uclass.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/udc/udc-uclass.c b/drivers/usb/gadget/udc/udc-uclass.c
> index fbe62bbce4..723d1cdfd7 100644
> --- a/drivers/usb/gadget/udc/udc-uclass.c
> +++ b/drivers/usb/gadget/udc/udc-uclass.c
> @@ -83,7 +83,7 @@ __weak int dm_usb_gadget_handle_interrupts(struct udevice *dev)
>  #if CONFIG_IS_ENABLED(DM)
>  UCLASS_DRIVER(usb_gadget_generic) = {
>  	.id		= UCLASS_USB_GADGET_GENERIC,
> -	.name		= "usb",
> +	.name		= "usb_gadget",
>  	.flags		= DM_UC_FLAG_SEQ_ALIAS,
>  };
>  #endif
> --
> 2.45.2

  parent reply	other threads:[~2024-08-07  7:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-02  9:28 [PATCH] usb: gadget: udc: Fix duplicate uclass name Zixun LI
2024-08-02  9:28 ` [PATCH] dm: core: Show device sequence instead in dm_dump_tree() Zixun LI
2024-08-06 21:50   ` Simon Glass
2024-08-27 23:22   ` Tom Rini
2024-08-02  9:28 ` [PATCH] cmd: bind: Use device sequence instead for driver bind/unbind Zixun LI
2024-08-06 21:50   ` Simon Glass
2024-08-20  6:23   ` Mattijs Korpershoek
2024-08-20  7:39     ` Mattijs Korpershoek
2024-08-27 23:22   ` Tom Rini
2024-08-06 21:50 ` [PATCH] usb: gadget: udc: Fix duplicate uclass name Simon Glass
2024-08-07  7:07 ` Mattijs Korpershoek [this message]
2024-08-07 12:36   ` Zixun LI
2024-08-13  8:28     ` Mattijs Korpershoek
2024-08-13 13:39       ` Zixun LI
2024-08-16 15:37         ` Mattijs Korpershoek

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=87frrgolp3.fsf@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=admin@hifiphile.com \
    --cc=lukma@denx.de \
    --cc=marex@denx.de \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.