Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248873
b: refs/heads/master
c: 603ab52
h: refs/heads/master
i:
  248871: 27786dc
v: v3
  • Loading branch information
Hema HK authored and Felipe Balbi committed May 13, 2011
1 parent 70ce96a commit c17f98e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c51e36dc11e44aa960744ec1c36fb2ab8d68b218
refs/heads/master: 603ab524ed95f566b0f25566484d4f449e433d74
15 changes: 15 additions & 0 deletions trunk/drivers/usb/otg/twl6030-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <linux/err.h>
#include <linux/notifier.h>
#include <linux/slab.h>
#include <linux/delay.h>

/* usb register definitions */
#define USB_VENDOR_ID_LSB 0x00
Expand Down Expand Up @@ -188,6 +189,19 @@ static int twl6030_phy_suspend(struct otg_transceiver *x, int suspend)
return 0;
}

static int twl6030_start_srp(struct otg_transceiver *x)
{
struct twl6030_usb *twl = xceiv_to_twl(x);

twl6030_writeb(twl, TWL_MODULE_USB, 0x24, USB_VBUS_CTRL_SET);
twl6030_writeb(twl, TWL_MODULE_USB, 0x84, USB_VBUS_CTRL_SET);

mdelay(100);
twl6030_writeb(twl, TWL_MODULE_USB, 0xa0, USB_VBUS_CTRL_CLR);

return 0;
}

static int twl6030_usb_ldo_init(struct twl6030_usb *twl)
{

Expand Down Expand Up @@ -403,6 +417,7 @@ static int __devinit twl6030_usb_probe(struct platform_device *pdev)
twl->otg.init = twl6030_phy_init;
twl->otg.shutdown = twl6030_phy_shutdown;
twl->otg.set_suspend = twl6030_phy_suspend;
twl->otg.start_srp = twl6030_start_srp;

/* init spinlock for workqueue */
spin_lock_init(&twl->lock);
Expand Down

0 comments on commit c17f98e

Please sign in to comment.