All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] USB: twl4030: Enable USB regulators before enabling USB charging
@ 2009-11-19 18:34 Aguilar Pena, Leed
  2009-11-20  8:37 ` Felipe Balbi
  2009-11-23 17:59 ` Tony Lindgren
  0 siblings, 2 replies; 4+ messages in thread
From: Aguilar Pena, Leed @ 2009-11-19 18:34 UTC (permalink / raw)
  To: linux-omap@vger.kernel.org; +Cc: Tony Lindgren

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>

---
 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 9e3e7a5..bd9883f 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)
 		 * 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");
 
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] USB: twl4030: Enable USB regulators before enabling USB charging
  2009-11-19 18:34 [PATCH] USB: twl4030: Enable USB regulators before enabling USB charging Aguilar Pena, Leed
@ 2009-11-20  8:37 ` Felipe Balbi
  2009-11-23 17:59 ` Tony Lindgren
  1 sibling, 0 replies; 4+ messages in thread
From: Felipe Balbi @ 2009-11-20  8:37 UTC (permalink / raw)
  To: ext Aguilar Pena, Leed; +Cc: linux-omap@vger.kernel.org, Tony Lindgren

On Thu, Nov 19, 2009 at 07:34:55PM +0100, ext Aguilar Pena, Leed wrote:
>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>

this should go to linux-usb, please Cc Greg KH and David Brownell.

-- 
balbi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] USB: twl4030: Enable USB regulators before enabling USB charging
  2009-11-19 18:34 [PATCH] USB: twl4030: Enable USB regulators before enabling USB charging Aguilar Pena, Leed
  2009-11-20  8:37 ` Felipe Balbi
@ 2009-11-23 17:59 ` Tony Lindgren
  2009-11-23 18:21   ` Gadiyar, Anand
  1 sibling, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2009-11-23 17:59 UTC (permalink / raw)
  To: Aguilar Pena, Leed; +Cc: linux-omap@vger.kernel.org

* Aguilar Pena, Leed <leed.aguilar@ti.com> [091119 10:34]:
> 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.

This should go to linux-usb list with linux-omap list Cc'd.

Regards,

Tony
 
> 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>
> 
> ---
>  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 9e3e7a5..bd9883f 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)
>  		 * 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");
>  
> -- 
> 1.6.0.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] USB: twl4030: Enable USB regulators before enabling USB charging
  2009-11-23 17:59 ` Tony Lindgren
@ 2009-11-23 18:21   ` Gadiyar, Anand
  0 siblings, 0 replies; 4+ messages in thread
From: Gadiyar, Anand @ 2009-11-23 18:21 UTC (permalink / raw)
  To: Tony Lindgren, Aguilar Pena, Leed; +Cc: linux-omap@vger.kernel.org

Tony Lindgren wrote:
> * Aguilar Pena, Leed <leed.aguilar@ti.com> [091119 10:34]:
> > 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.
> 
> This should go to linux-usb list with linux-omap list Cc'd.
> 

It's already in greg's queue.

- Anand

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-23 18:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-19 18:34 [PATCH] USB: twl4030: Enable USB regulators before enabling USB charging Aguilar Pena, Leed
2009-11-20  8:37 ` Felipe Balbi
2009-11-23 17:59 ` Tony Lindgren
2009-11-23 18:21   ` Gadiyar, Anand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.