summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory Herrero <gregory.herrero@intel.com>2015-04-29 22:09:10 +0200
committerFelipe Balbi <balbi@ti.com>2015-04-29 15:19:28 -0500
commit097ee6627cc8c400d77fc9a42fd787fe0fb04d76 (patch)
treeb745f431fff2b2bdb320885aa48580380265c908
parent18b2b37c59e1bcd5a61716731ec5549fb5bb0203 (diff)
downloadop-kernel-dev-097ee6627cc8c400d77fc9a42fd787fe0fb04d76.zip
op-kernel-dev-097ee6627cc8c400d77fc9a42fd787fe0fb04d76.tar.gz
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 <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--drivers/usb/dwc2/gadget.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 56a08ac..eb906bd 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 */
OpenPOWER on IntegriCloud