diff options
author | Hema HK <hemahk@ti.com> | 2011-02-17 12:06:10 +0530 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-02-18 14:05:53 +0200 |
commit | 002eda1348788f623dc42231dcda5f591d753124 (patch) | |
tree | 144e7b97998994fb1c3c46cfa48e1996d84417b1 /drivers/usb/musb/musb_gadget.c | |
parent | 647b2d9c61fe9a842dd89eb01b5f01e9d437993c (diff) | |
download | op-kernel-dev-002eda1348788f623dc42231dcda5f591d753124.zip op-kernel-dev-002eda1348788f623dc42231dcda5f591d753124.tar.gz |
usb: musb: OMAP4430: Fix usb device detection if connected during boot
OMAP4430 is embedded with UTMI PHY. This PHY does not support the
OTG features like ID pin detection and VBUS detection. This function
is exported to an external companion chip TWL6030. Software must retrieve
the OTG HNP and SRP status from the TWL6030 and configure the bits inside
the control module that drive the related USBOTGHS UTMI interface signals.
It must also read back the UTMI signals needed to configure the TWL6030
OTG module.
Can find more details in the TRM[1].
[1]:http://focus.ti.com/pdfs/wtbu/OMAP4430_ES2.0_Public_TRM_vJ.pdf
In OMAP4430 musb driver VBUS and ID notifications are received from the
transceiver driver. If the cable/device is connected during boot,
notifications from transceiver driver will be missed till musb driver
is loaded.
Patch to configure the transceiver in the platform_enable/disable
functions and enable the vbus in the gadget driver based on the
last_event of the otg_transceiver.
Signed-off-by: Hema HK <hemahk@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/musb_gadget.c')
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 0f59bf9..95fbacc 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -1877,6 +1877,10 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver, if (retval < 0) { DBG(1, "add_hcd failed, %d\n", retval); goto err2; + + if ((musb->xceiv->last_event == USB_EVENT_ID) + && musb->xceiv->set_vbus) + otg_set_vbus(musb->xceiv, 1); } hcd->self.uses_pio_for_control = 1; |