----- Mail original ----- De: "Fabio Estevam" <festevam@xxxxxxxxx> À: "Robert Jarzmik" <robert.jarzmik@xxxxxxx> Cc: "Felipe Balbi" <balbi@xxxxxx>, "Linus Walleij" <linus.walleij@xxxxxxxxxx>, "Philipp Zabel" <philipp.zabel@xxxxxxxxx>, "USB list" <linux-usb@xxxxxxxxxxxxxxx> 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 majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html