usb: gadget: udc: Fix duplicate uclass name

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.

Signed-off-by: Zixun LI <admin@hifiphile.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/all/20240802092820.917450-1-admin@hifiphile.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
This commit is contained in:
Zixun LI
2024-08-02 11:28:11 +02:00
committed by Mattijs Korpershoek
parent d6376f7ed8
commit 73f5b54a58

View File

@@ -83,7 +83,7 @@ __weak int dm_usb_gadget_handle_interrupts(struct udevice *dev)
#if CONFIG_IS_ENABLED(DM) #if CONFIG_IS_ENABLED(DM)
UCLASS_DRIVER(usb_gadget_generic) = { UCLASS_DRIVER(usb_gadget_generic) = {
.id = UCLASS_USB_GADGET_GENERIC, .id = UCLASS_USB_GADGET_GENERIC,
.name = "usb", .name = "usb_gadget",
.flags = DM_UC_FLAG_SEQ_ALIAS, .flags = DM_UC_FLAG_SEQ_ALIAS,
}; };
#endif #endif