From: Gregory Herrero Date: Wed, 29 Apr 2015 20:09:10 +0000 (+0200) Subject: usb: dwc2: gadget: enable otg flag in dual role configuration X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=097ee6627cc8c400d77fc9a42fd787fe0fb04d76;p=linux-beck.git usb: dwc2: gadget: enable otg flag in dual role configuration Inform that device is otg-capable in case of otg configuration. Acked-by: John Youn Signed-off-by: Gregory Herrero Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 56a08ac3849a..eb906bd85aab 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -3525,6 +3525,8 @@ 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 (hsotg->dr_mode == USB_DR_MODE_OTG) + hsotg->gadget.is_otg = 1; /* reset the system */