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

2015-08-13 Thread Fabio Estevam
On Thu, Aug 13, 2015 at 7:28 AM, Roger Quadros  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:  # 4.0+
> Signed-off-by: Roger Quadros 

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

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


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

2015-08-13 Thread Roger Quadros
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:  # 4.0+
Signed-off-by: Roger Quadros 
---
 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/