[PATCH 1/1] usb: dwc3: gadget: Set the OTG flag in dwc3 gadget driver.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Set the otg flag during dwc3 gadget init function for ceritification
test requirement.
We must set this otg flag for ceritification test in order to be able
to return OTG descriptor during enumeration.

Signed-off-by: Jianqiang Tang <jianqiang.tang@xxxxxxxxx>
---
 drivers/usb/dwc3/gadget.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index a58376f..72dc8dc 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2750,6 +2750,12 @@ int dwc3_gadget_init(struct dwc3 *dwc)
 	dwc->gadget.name		= "dwc3-gadget";
 
 	/*
+	 * Set the otg flag if Controller in OTG mode for Ceritification Test
+	 */
+	if (dwc->dr_mode == USB_DR_MODE_OTG)
+		dwc->gadget.is_otg = 1;
+
+	/*
 	 * FIXME We might be setting max_speed to <SUPER, however versions
 	 * <2.20a of dwc3 have an issue with metastability (documented
 	 * elsewhere in this driver) which tells us we can't set max speed to
-- 
1.9.1

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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux