Skip to content

Commit

Permalink
usb: musb: gadget: use platform callback to enable vbus
Browse files Browse the repository at this point in the history
On some platform configurations (like OMAP3+twl4030) it's the platform
code that enables VBUS, not OTG transceiver, so call vbus platform
callback instead, it will then call the transceiver if needed.

This fixes a use case where USB cable is plugged first and gadget
driver is loaded later after that.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Grazvydas Ignotas authored and Felipe Balbi committed Apr 2, 2013
1 parent 2c1fe89 commit b65ae0f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/usb/musb/musb_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1848,9 +1848,8 @@ static int musb_gadget_start(struct usb_gadget *g,
goto err;
}

if ((musb->xceiv->last_event == USB_EVENT_ID)
&& otg->set_vbus)
otg_set_vbus(otg, 1);
if (musb->xceiv->last_event == USB_EVENT_ID)
musb_platform_set_vbus(musb, 1);

hcd->self.uses_pio_for_control = 1;

Expand Down

0 comments on commit b65ae0f

Please sign in to comment.