aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/otg/twl6030-usb.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/usb/otg/twl6030-usb.c b/drivers/usb/otg/twl6030-usb.c
index 6e920de64ef6..3f2e07011a48 100644
--- a/drivers/usb/otg/twl6030-usb.c
+++ b/drivers/usb/otg/twl6030-usb.c
@@ -31,6 +31,7 @@
31#include <linux/err.h> 31#include <linux/err.h>
32#include <linux/notifier.h> 32#include <linux/notifier.h>
33#include <linux/slab.h> 33#include <linux/slab.h>
34#include <linux/delay.h>
34 35
35/* usb register definitions */ 36/* usb register definitions */
36#define USB_VENDOR_ID_LSB 0x00 37#define USB_VENDOR_ID_LSB 0x00
@@ -188,6 +189,19 @@ static int twl6030_phy_suspend(struct otg_transceiver *x, int suspend)
188 return 0; 189 return 0;
189} 190}
190 191
192static int twl6030_start_srp(struct otg_transceiver *x)
193{
194 struct twl6030_usb *twl = xceiv_to_twl(x);
195
196 twl6030_writeb(twl, TWL_MODULE_USB, 0x24, USB_VBUS_CTRL_SET);
197 twl6030_writeb(twl, TWL_MODULE_USB, 0x84, USB_VBUS_CTRL_SET);
198
199 mdelay(100);
200 twl6030_writeb(twl, TWL_MODULE_USB, 0xa0, USB_VBUS_CTRL_CLR);
201
202 return 0;
203}
204
191static int twl6030_usb_ldo_init(struct twl6030_usb *twl) 205static int twl6030_usb_ldo_init(struct twl6030_usb *twl)
192{ 206{
193 207
@@ -403,6 +417,7 @@ static int __devinit twl6030_usb_probe(struct platform_device *pdev)
403 twl->otg.init = twl6030_phy_init; 417 twl->otg.init = twl6030_phy_init;
404 twl->otg.shutdown = twl6030_phy_shutdown; 418 twl->otg.shutdown = twl6030_phy_shutdown;
405 twl->otg.set_suspend = twl6030_phy_suspend; 419 twl->otg.set_suspend = twl6030_phy_suspend;
420 twl->otg.start_srp = twl6030_start_srp;
406 421
407 /* init spinlock for workqueue */ 422 /* init spinlock for workqueue */
408 spin_lock_init(&twl->lock); 423 spin_lock_init(&twl->lock);