[PATCH v2 2/5] usb: gadget: Add bcdDevice for the DWC2 USB Gadget Controller

Patrice CHOTARD patrice.chotard at foss.st.com
Wed Sep 1 11:12:58 CEST 2021


Hi Lukasz

Can you add your reviewed-by on this patch ?
This patch, and the other 4 patches of this serie, are still blocked on patchwork since April.

Thanks ;-)
Patrice

On 4/19/21 11:45 AM, Patrice Chotard wrote:
> Add an entry in usb_gadget_controller_number() for the DWC2
> gadget controller. It is used to bind the USB Ethernet driver.
> 
> Signed-off-by: Patrice Chotard <patrice.chotard at foss.st.com>
> Reported-by: Herbert Poetzl <herbert at 13thfloor.at>
> Cc: Marek Vasut <marex at denx.de>
> Cc: Herbert Poetzl <herbert at 13thfloor.at>
> ---
> 
> (no changes since v1)
> 
>  drivers/usb/gadget/gadget_chips.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h
> index 0cdf47c2dd..06e6a48949 100644
> --- a/drivers/usb/gadget/gadget_chips.h
> +++ b/drivers/usb/gadget/gadget_chips.h
> @@ -167,6 +167,12 @@
>  #define gadget_is_mtu3(g)        0
>  #endif
>  
> +#ifdef CONFIG_USB_GADGET_DWC2_OTG
> +#define gadget_is_dwc2(g)        (!strcmp("dwc2-udc", (g)->name))
> +#else
> +#define gadget_is_dwc2(g)        0
> +#endif
> +
>  /**
>   * usb_gadget_controller_number - support bcdDevice id convention
>   * @gadget: the controller being driven
> @@ -232,5 +238,7 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
>  		return 0x25;
>  	else if (gadget_is_mtu3(gadget))
>  		return 0x26;
> +	else if (gadget_is_dwc2(gadget))
> +		return 0x27;
>  	return -ENOENT;
>  }
> 


More information about the U-Boot mailing list