Skip to content

Commit 6a4290c

Browse files
Jianqiang Tangfelipebalbi
authored andcommitted
usb: dwc3: gadget: set the OTG flag in dwc3 gadget driver.
This patch is needed in order to pass one test case defined in the OTG Automated Compliance Test specification. Specification location: http://www.usb.org/developers/onthego/otgeh_compliance_plan_1_2.pdf This test case uses PET Tool, and PET Tool is one USB hardware equipment provided by MQP Electronics. Test case id is 6.8.3 B-UUT Bypass Capacitance. We must set this otg flag in order to be able to return OTG descriptor during enumeration, otherwise this test case with failed with below error: "Get OTG descriptor request stalled". Signed-off-by: Jianqiang Tang <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent a55f628 commit 6a4290c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/usb/dwc3/gadget.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2789,6 +2789,7 @@ int dwc3_gadget_init(struct dwc3 *dwc)
27892789
dwc->gadget.speed = USB_SPEED_UNKNOWN;
27902790
dwc->gadget.sg_supported = true;
27912791
dwc->gadget.name = "dwc3-gadget";
2792+
dwc->gadget.is_otg = dwc->dr_mode == USB_DR_MODE_OTG;
27922793

27932794
/*
27942795
* FIXME We might be setting max_speed to <SUPER, however versions

0 commit comments

Comments
 (0)