summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc2/gadget.c
diff options
context:
space:
mode:
authorGregory Herrero <gregory.herrero@intel.com>2015-04-29 23:09:10 +0300
committerFelipe Balbi <balbi@ti.com>2015-04-29 23:19:28 +0300
commit097ee6627cc8c400d77fc9a42fd787fe0fb04d76 (patch)
treeb745f431fff2b2bdb320885aa48580380265c908 /drivers/usb/dwc2/gadget.c
parent18b2b37c59e1bcd5a61716731ec5549fb5bb0203 (diff)
downloadlinux-097ee6627cc8c400d77fc9a42fd787fe0fb04d76.tar.xz
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>
Diffstat (limited to 'drivers/usb/dwc2/gadget.c')
-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 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 */