Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1206684

[PATCH] usb: phy: phy-generic: Fix reset behaviour on legacy boot

From Roger Quadros <rogerq@ti.com>
Newsgroups linux.kernel
Subject [PATCH] usb: phy: phy-generic: Fix reset behaviour on legacy boot
Date 2015-08-13 12:30 +0200
Message-ID <pWXVM-uO-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] usb: phy: phy-generic: Fix reset behaviour on legacy boot Roger Quadros <rogerq@ti.com> - 2015-08-13 12:30 +0200
  Re: [PATCH] usb: phy: phy-generic: Fix reset behaviour on legacy boot Fabio Estevam <festevam@gmail.com> - 2015-08-14 03:50 +0200

csiph-web