diff options
author | Aguilar Pena, Leed <leed.aguilar@ti.com> | 2009-11-20 12:32:53 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 14:55:25 -0500 |
commit | be30fc4b650acb85549fd0a9c42fe042366de009 (patch) | |
tree | e6730cb87c9044950404b5092b999776639ad2bc | |
parent | ec412b92dbe3ea839716853eea058d1bcc5e6ca4 (diff) |
USB: twl4030: Enable USB regulators before enabling USB charging
For TWL family of power management ICs, USB charging works only
when USB regulators are in enabled state: 3v1, 1v5, 1v8
On a USB cable attach, twl4030_phy_resume(twl) function enables
the regulators. Enable USB charging, only after all regulators
are enabled.
Its observed that enabling USB charging before regulators are
enabled, causes USB charging to fail.
Tested on: Zoom2: omap3430: ES3.1 + TWL5030
Needs T2-MADC and T2-BCI drivers which are still not upstreamed.
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Leed Aguilar <leed.aguilar@ti.com>
Acked-by: Vikram Pandita <vikram.pandita@ti.com>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/otg/twl4030-usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index 9e3e7a5c258b..bd9883f41e63 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/twl4030-usb.c | |||
@@ -598,12 +598,12 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl) | |||
598 | * USB_LINK_VBUS state. musb_hdrc won't care until it | 598 | * USB_LINK_VBUS state. musb_hdrc won't care until it |
599 | * starts to handle softconnect right. | 599 | * starts to handle softconnect right. |
600 | */ | 600 | */ |
601 | twl4030charger_usb_en(status == USB_LINK_VBUS); | ||
602 | |||
603 | if (status == USB_LINK_NONE) | 601 | if (status == USB_LINK_NONE) |
604 | twl4030_phy_suspend(twl, 0); | 602 | twl4030_phy_suspend(twl, 0); |
605 | else | 603 | else |
606 | twl4030_phy_resume(twl); | 604 | twl4030_phy_resume(twl); |
605 | |||
606 | twl4030charger_usb_en(status == USB_LINK_VBUS); | ||
607 | } | 607 | } |
608 | sysfs_notify(&twl->dev->kobj, NULL, "vbus"); | 608 | sysfs_notify(&twl->dev->kobj, NULL, "vbus"); |
609 | 609 | ||