Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c51c319b authored by Jack Pham's avatar Jack Pham
Browse files

usb: dwc3: gadget: Allow booting in host mode



Typically gadget drivers will call usb_composite_probe() during
bootup which initializes the UDC. However, for DRD/OTG devices,
if the controller is already activated in host mode,
dwc3_gadget_start() will fail trying to enable ep0, causing the
gadget driver to fail to bind during its probe.

To fix this, skip the device-specific initialization in
dwc_gadget_start() if the driver supports OTG. Instead,
dwc3_gadget_restart() will handle it when device mode is activated
via dwc3_gadget_run_stop(). Finally, factor out the common init
sequence into a new __dwc3_gadget_start() helper.

Change-Id: Ie83da8e4736c367fe72d41928a460b00820701aa
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent af83c6c7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment