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 7:20 PM, Robert Jarzmik <robert.jarzmik@xxxxxxx> wrote:

> From 4005a6abf519272267399ac4030a5671f7877ca4 Mon Sep 17 00:00:00 2001
> From: Robert Jarzmik <robert.jarzmik@xxxxxxx>
> Date: Tue, 27 Jan 2015 06:27:03 +0100
> Subject: [PATCH] usb: phy: generic: fix the gpios to be optional
>
> All the gpios, ie. reset-gpios and vbus-detect-gpio, should be optional

> diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
> index dd05254..012534a 100644
> --- a/drivers/usb/phy/phy-generic.c
> +++ b/drivers/usb/phy/phy-generic.c
> @@ -218,12 +218,12 @@ 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");
> -               err = PTR_ERR(nop->gpiod_reset);
> +               nop->gpiod_reset = devm_gpiod_get_optional(dev, "reset");
> +               err = PTR_ERR_OR_ZERO(nop->gpiod_reset);
>                 if (!err) {
> -                       nop->gpiod_vbus = devm_gpiod_get(dev,
> -                                                        "vbus-detect-gpio");
> -                       err = PTR_ERR(nop->gpiod_vbus);
> +                       nop->gpiod_vbus = devm_gpiod_get_optional(dev,
> +                                                        "vbus-detect");
> +                       err = PTR_ERR_OR_ZERO(nop->gpiod_vbus);

With this patch applied I see a kernel hang:

[    1.340497] ci_hdrc ci_hdrc.1: doesn't support gadget
[    1.345673] ci_hdrc ci_hdrc.1: EHCI Host Controller
[    1.350887] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
[    1.372931] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[    1.383491] hub 1-0:1.0: USB hub found
[    1.387585] hub 1-0:1.0: 1 port detected

(hangs here)
--
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