----- Mail original -----
De: "Fabio Estevam" <feste...@gmail.com>
À: "Robert Jarzmik" <robert.jarz...@free.fr>
Cc: "Felipe Balbi" <ba...@ti.com>, "Linus Walleij" <linus.wall...@linaro.org>, 
"Philipp Zabel" <philipp.za...@gmail.com>, "USB list" 
<linux-usb@vger.kernel.org>
Envoyé: Mardi 27 Janvier 2015 12:23:43
Objet: Re: [PATCH v2 1/3] usb: phy: generic: migrate to gpio_desc

> I'll amend my patch just as you said, my bad.
> but the problem I see is that even if I use:
> nop->gpiod_reset = devm_gpiod_get_optional(dev, "reset");
>
> The 'reset-gpio' pin cannot be retrieved. This is the point I don't
> understand currently.
If the reset-gpio device-tree property doesn't exist, devm_gpiod_get_optional()
will return a NULL pointer, and nop->gpiod_reset = NULL.

Then in nop_reset_set(), the first test will assert that
(nop->gpiod_reset == NULL) and return.

For the longer story, devm_gpiod_get_optional() returns NULL :
 - because gpiod_get_index_optional() returns NULL
 - because gpiod_get_index returns -ENOENT
 - because of_find_gpio() returns -ENOENT

Does that answer you question ?

Cheers.

--
Robert
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to