From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Zixun LI <admin@hifiphile.com>
Cc: Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>,
Lukasz Majewski <lukma@denx.de>, Marek Vasut <marex@denx.de>,
u-boot@lists.denx.de, Jagan Teki <jagan@amarulasolutions.com>,
Stefano Babic <sbabic@denx.de>,
Fabio Estevam <festevam@gmail.com>,
"NXP i.MX U-Boot Team" <uboot-imx@nxp.com>
Subject: Re: [PATCH] usb: gadget: udc: Fix duplicate uclass name
Date: Fri, 16 Aug 2024 17:37:05 +0200 [thread overview]
Message-ID: <87ttfklbry.fsf@baylibre.com> (raw)
In-Reply-To: <CA+GyqeZBzMct6nTKQx4k4cyxn8kdoQ69K58WOLdPgtLU_12ciA@mail.gmail.com>
Hi Zixun,
On mar., août 13, 2024 at 15:39, Zixun LI <admin@hifiphile.com> wrote:
> Hi Mattijs,
>
> On Tue, Aug 13, 2024 at 10:28 AM Mattijs Korpershoek
> <mkorpershoek@baylibre.com> wrote:
>>
>> Thank you for giving some board examples. I am still a bit unclear on
>> the meaning of:
>>
>> """
>> This breaks the capacity of using "usb" as DT alias sequence numbering
>> which needs a fix afterwards.
>> """
>>
>> I have added Jagan, Stefano, Fabio and the NXP team in CC. Does anyone
>> of you have any concerns with this patch ?
>>
>> If someone could test it, that would be helpful.
>
> The device sequence number is affected by uclass_find_next_free_seq() in
> uclass.c, in this function uclass name is used to determine the number.
>
> Since the gadget class's name changed to "usb_gadget" from "usb", alias
> binding "usb1 = &usbotg;" is not effective anymore. As now it searches for
> "usb_gadget1 = &usbotg;".
>
> uclass_find_device_by_seq(UCLASS_USB_GADGET_GENERIC,) would fail as sequence
> number is changed.
Thank you for the explanation.
Looking at the code, I don't see anyone calling:
- uclass_find_device_by_seq(UCLASS_USB_GADGET
And one occurrence of:
- uclass_get_device_by_seq(UCLASS_USB_GADGET_GENERIC, index, &dev);
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
>
> I made a tentative fix in
> https://lore.kernel.org/u-boot/20240731134257.686017-2-admin@hifiphile.com/
> But Simon doesn't want to modify uclass_driver structure only for gadget
> class.
>
> Regards,
> Zixun
prev parent reply other threads:[~2024-08-16 15:37 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
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 [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=87ttfklbry.fsf@baylibre.com \
--to=mkorpershoek@baylibre.com \
--cc=admin@hifiphile.com \
--cc=festevam@gmail.com \
--cc=jagan@amarulasolutions.com \
--cc=lukma@denx.de \
--cc=marex@denx.de \
--cc=sbabic@denx.de \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.com \
/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