]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: phy: make GPIOs optional for the generic phy
authorPaul Zimmerman <Paul.Zimmerman@synopsys.com>
Thu, 15 Jan 2015 02:45:12 +0000 (02:45 +0000)
committerFelipe Balbi <balbi@ti.com>
Mon, 19 Jan 2015 18:53:32 +0000 (12:53 -0600)
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 e9f2cefb0cd "usb: phy:
generic: migrate to gpio_desc" and 135b3c4304d "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>
drivers/usb/phy/phy-generic.c

index dd05254241fb25af82b0a5963f777711fedfe0ef..9a826ff319514a954b43cb04b926620d90b5852a 100644 (file)
@@ -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);
                }