On Tue, Jan 27, 2015 at 6:03 PM, Felipe Balbi <[email protected]> wrote:
> wrong test, you should use IS_ERR(), NULL is a valid gpio descriptor.
Ok, here we go:
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -218,11 +218,13 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_
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");
+ if (IS_ERR(nop->gpiod_reset))
+ pr_err("******* failed to retrieve reset-gpios\n");
err = PTR_ERR(nop->gpiod_reset);
if (!err) {
- nop->gpiod_vbus = devm_gpiod_get(dev,
- "vbus-detect-gpio");
+ nop->gpiod_vbus = devm_gpiod_get_optional(dev,
+ "vbus-detect");
err = PTR_ERR(nop->gpiod_vbus);
}
} else if (pdata) {
which leads to:
[ 0.126378] usbcore: registered new interface driver hub
[ 0.126617] usbcore: registered new device driver usb
[ 0.127025] usbphy:usbphy@0 supply vcc not found, using dummy regulator
[ 0.127588] usb_phy_generic usbphy:usbh1phy@0: Error requesting RESET GPIO
[ 0.127677] usb_phy_generic: probe of usbphy:usbh1phy@0 failed with
error -1643301316
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html