Robert Jarzmik <robert.jarzmik@xxxxxxx> writes: > I'm not convinced of the "so many issues". So far I see the > "gpiod_get_optional()" requirement, which is a one liner patch. Would you try the following patch to see if it fixes all your concerns please ? Cheers. -- Robert ---<8--- >From 7b34a3aa2a0717b53cd458611048f50edde53d0c Mon Sep 17 00:00:00 2001 From: Robert Jarzmik <robert.jarzmik@xxxxxxx> Date: Tue, 27 Jan 2015 06:27:03 +0100 Subject: [PATCH] usb: phy: generic: fix the gpios to be optional All the gpios, ie. reset-gpios and vbus-detect-gpio, should be optional and not prevent the driver from working. Fix the regression in the behavior introduced by commit "usb: phy: generic: migrate to gpio_desc". Signed-off-by: Robert Jarzmik <robert.jarzmik@xxxxxxx> --- drivers/usb/phy/phy-generic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c index dd05254..c767bf0 100644 --- a/drivers/usb/phy/phy-generic.c +++ b/drivers/usb/phy/phy-generic.c @@ -218,10 +218,10 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop, clk_rate = 0; needs_vcc = of_property_read_bool(node, "vcc-supply"); - nop->gpiod_reset = devm_gpiod_get(dev, "reset-gpios"); + nop->gpiod_reset = devm_gpiod_get_optional(dev, "reset-gpios"); err = PTR_ERR(nop->gpiod_reset); if (!err) { - nop->gpiod_vbus = devm_gpiod_get(dev, + nop->gpiod_vbus = devm_gpiod_get_optional(dev, "vbus-detect-gpio"); err = PTR_ERR(nop->gpiod_vbus); } @@ -242,7 +242,7 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop, if (err == -EPROBE_DEFER) return -EPROBE_DEFER; if (err) { - dev_err(dev, "Error requesting RESET GPIO\n"); + dev_err(dev, "Error requesting RESET or VBUS GPIO\n"); return err; } -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html