linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: phy: phy-generic: Fix reset behaviour on legacy boot
@ 2015-08-13 10:28 Roger Quadros
  2015-08-14  1:48 ` Fabio Estevam
  0 siblings, 1 reply; 2+ messages in thread
From: Roger Quadros @ 2015-08-13 10:28 UTC (permalink / raw)
  To: balbi
  Cc: tony, robert.jarzmik, fabio.estevam, linux-usb, linux-omap,
	linux-kernel, Roger Quadros, stable

The gpio-desc migration done in v4.0 caused a regression
with legacy boots due to reversed reset logic.
e.g. omap3-beagle USB host breaks on legacy boot.

Request the reset GPIO with GPIOF_ACTIVE_LOW flag so that
it matches the driver logic and pin behaviour.

Fixes: e9f2cefb0cdc ("usb: phy: generic: migrate to gpio_desc")
Cc: <stable@vger.kernel.org> # 4.0+
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/usb/phy/phy-generic.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index deee68e..0cd85f2 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -230,7 +230,8 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop,
 		clk_rate = pdata->clk_rate;
 		needs_vcc = pdata->needs_vcc;
 		if (gpio_is_valid(pdata->gpio_reset)) {
-			err = devm_gpio_request_one(dev, pdata->gpio_reset, 0,
+			err = devm_gpio_request_one(dev, pdata->gpio_reset,
+						    GPIOF_ACTIVE_LOW,
 						    dev_name(dev));
 			if (!err)
 				nop->gpiod_reset =
-- 
2.1.4


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

* Re: [PATCH] usb: phy: phy-generic: Fix reset behaviour on legacy boot
  2015-08-13 10:28 [PATCH] usb: phy: phy-generic: Fix reset behaviour on legacy boot Roger Quadros
@ 2015-08-14  1:48 ` Fabio Estevam
  0 siblings, 0 replies; 2+ messages in thread
From: Fabio Estevam @ 2015-08-14  1:48 UTC (permalink / raw)
  To: Roger Quadros
  Cc: Felipe Balbi, Tony Lindgren, Robert Jarzmik, Fabio Estevam,
	USB list, linux-omap, linux-kernel, stable

On Thu, Aug 13, 2015 at 7:28 AM, Roger Quadros <rogerq@ti.com> wrote:
> The gpio-desc migration done in v4.0 caused a regression
> with legacy boots due to reversed reset logic.
> e.g. omap3-beagle USB host breaks on legacy boot.
>
> Request the reset GPIO with GPIOF_ACTIVE_LOW flag so that
> it matches the driver logic and pin behaviour.
>
> Fixes: e9f2cefb0cdc ("usb: phy: generic: migrate to gpio_desc")
> Cc: <stable@vger.kernel.org> # 4.0+
> Signed-off-by: Roger Quadros <rogerq@ti.com>

The USB on my mx51-babbage board still works fine with this change:

Tested-by: Fabio Estevam <fabio.estevam@freescale.com>

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

end of thread, other threads:[~2015-08-14  1:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-13 10:28 [PATCH] usb: phy: phy-generic: Fix reset behaviour on legacy boot Roger Quadros
2015-08-14  1:48 ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).