Skip to content

Commit

Permalink
usb: phy: make GPIOs optional for the generic phy
Browse files Browse the repository at this point in the history
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 e9f2cef "usb: phy:
generic: migrate to gpio_desc" and 135b3c4 "usb: dwc2: platform:
add generic PHY framework support".

Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Paul Zimmerman authored and Felipe Balbi committed Jan 19, 2015
1 parent 3c4c733 commit da89dba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/phy/phy-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit da89dba

Please sign in to comment.