Hi Robert, On Tue, Jan 27, 2015 at 3:36 AM, Robert Jarzmik <robert.jarzmik@xxxxxxx> wrote: > 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 ? Thanks for your help. > ---<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"); According to Documentation/gpio/board.txt: "GPIOs mappings are defined in the consumer device's node, in a property named <function>-gpios" so this should be: nop->gpiod_reset = devm_gpiod_get_optional(dev, "reset"); On imx51-babbage.dts we do pass 'reset-gpios', but even devm_gpiod_get_optional(dev, "reset") returns NULL. The issue I see is that I am never able to retrieve the reset-gpios when using the gpiod API. Any ideas? Thanks -- 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