[U-Boot] [PATCH v4 06/10] dm: usb: create a new UCLASS ID for USB gadget devices

Simon Glass sjg at chromium.org
Tue Dec 11 01:03:59 UTC 2018


Hi Jean-Jacques,

On Thu, 29 Nov 2018 at 02:54, Jean-Jacques Hiblot <jjhiblot at ti.com> wrote:
>
> UCLASS_USB_DEV_GENERIC was meant for USB devices connected to host
> controllers, not gadget devices.
> Adding a new UCLASS for gadget devices alone.
>
> Also move the generic DM code for USB gadgets in a separate file for
> clarity.
>
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
>
> ---
>
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
>
>  board/sunxi/board.c                 |  2 +-
>  drivers/usb/dwc3/dwc3-generic.c     |  2 +-
>  drivers/usb/gadget/ether.c          |  2 +-
>  drivers/usb/gadget/udc/Makefile     |  4 +++
>  drivers/usb/gadget/udc/udc-core.c   | 41 --------------------------
>  drivers/usb/gadget/udc/udc-uclass.c | 58 +++++++++++++++++++++++++++++++++++++
>  drivers/usb/musb-new/omap2430.c     |  2 +-
>  drivers/usb/musb-new/sunxi.c        |  2 +-
>  include/dm/uclass-id.h              |  1 +
>  9 files changed, 68 insertions(+), 46 deletions(-)
>  create mode 100644 drivers/usb/gadget/udc/udc-uclass.c

We should have a test for this, with a sandbox driver for this uclass,
as we have done for UCLASS_USB.

Regards,
Simon


More information about the U-Boot mailing list