On 3/17/2015 2:54 AM, Mian Yousaf Kaukab wrote:
> From: Gregory Herrero <[email protected]>
> 
> Signed-off-by: Gregory Herrero <[email protected]>
> ---
>  drivers/usb/dwc2/gadget.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> index bb83826..2e27bfd 100644
> --- a/drivers/usb/dwc2/gadget.c
> +++ b/drivers/usb/dwc2/gadget.c
> @@ -3524,6 +3524,9 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq)
>       hsotg->gadget.max_speed = USB_SPEED_HIGH;
>       hsotg->gadget.ops = &s3c_hsotg_gadget_ops;
>       hsotg->gadget.name = dev_name(dev);
> +#if IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)
> +     hsotg->gadget.is_otg = 1;
> +#endif

Should check dr_mode as well. It may be peripheral even though we
are configured for DRD.

John

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to