Re: [PATCH v2 1/3] usb: phy: generic: migrate to gpio_desc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 27, 2015 at 12:16 PM, Fabio Estevam <festevam@xxxxxxxxx> wrote:
> On Tue, Jan 27, 2015 at 11:37 AM,  <robert.jarzmik@xxxxxxx> wrote:
>
>> Is in the right node, ie. the node that has compatible == "usb-nop-xceiv" ?
>
> Yes, it is correct since this commit:
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/imx51-babbage.dts?id=7a9f0604bd56936b2b18f49824e0e392dc7878c3

This is the patch I have applied:

--- 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 (!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) {

and I am getting:

[    0.127270] usbcore: registered new device driver usb
[    0.127564] ******* failed to retrieve reset-gpios
[    0.127677] usbphy:usbphy@0 supply vcc not found, using dummy regulator
[    0.128234] usb_phy_generic usbphy:usbh1phy@0: Error requesting RESET GPIO
[    0.128323] 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux