Commit da89dba1 authored by Paul Zimmerman's avatar Paul Zimmerman Committed by Felipe Balbi

usb: phy: make GPIOs optional for the generic phy

The use of GPIOs should be optional for the generic phy, otherwise
the Altera SOCFPGA platform at least is broken.

Fixes breakage caused by a combination of e9f2cefb "usb: phy:
generic: migrate to gpio_desc" and 135b3c43 "usb: dwc2: platform:
add generic PHY framework support".
Reviewed-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarPaul Zimmerman <paulz@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 3c4c733c
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment