瀏覽代碼

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>
Gregory Herrero 10 年之前
父節點
當前提交
097ee6627c
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/usb/dwc2/gadget.c

+ 2 - 0
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 */