Skip to content

Commit

Permalink
USB: twl4030: Enable USB regulators before enabling USB charging
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Aguilar Pena, Leed authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent ec412b9 commit be30fc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/otg/twl4030-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,12 +598,12 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl)
* USB_LINK_VBUS state. musb_hdrc won't care until it
* starts to handle softconnect right.
*/
twl4030charger_usb_en(status == USB_LINK_VBUS);

if (status == USB_LINK_NONE)
twl4030_phy_suspend(twl, 0);
else
twl4030_phy_resume(twl);

twl4030charger_usb_en(status == USB_LINK_VBUS);
}
sysfs_notify(&twl->dev->kobj, NULL, "vbus");

Expand Down

0 comments on commit be30fc4

Please sign in to comment.