From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Paul Zimmerman <Paul.Zimmerman@synopsys.com>,
Felipe Balbi <balbi@ti.com>
Cc: Yunzhi Li <lyz@rock-chips.com>,
"Dinh Nguyen \(dinguyen\@opensource.altera.com\)"
<dinguyen@opensource.altera.com>,
"gregkh\@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-usb\@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"heiko\@sntech.de" <heiko@sntech.de>,
"jwerner\@chromium.org" <jwerner@chromium.org>,
"dianders\@chromium.org" <dianders@chromium.org>,
"olof\@lixom.net" <olof@lixom.net>,
"huangtao\@rock-chips.com" <huangtao@rock-chips.com>,
"zyw\@rock-chips.com" <zyw@rock-chips.com>,
"cf\@rock-chips.com" <cf@rock-chips.com>,
"linux-rockchip\@lists.infradead.org"
<linux-rockchip@lists.infradead.org>,
"linus.walleij\@linaro.org" <linus.walleij@linaro.org>
Subject: Re: [PATCH v7 3/5] usb: dwc2: add generic PHY framework support for dwc2 usb controler platform driver.
Date: Tue, 13 Jan 2015 10:35:52 +0100 [thread overview]
Message-ID: <87ppajxbt3.fsf@free.fr> (raw)
In-Reply-To: <A2CA0424C0A6F04399FB9E1CD98E030484506F3B@US01WEMBX2.internal.synopsys.com> (Paul Zimmerman's message of "Tue, 13 Jan 2015 00:54:45 +0000")
Paul Zimmerman <Paul.Zimmerman@synopsys.com> writes:
> The patch below fixes it. And it seems like the right thing to me,
> since GPIOs should be optional for a generic phy, I would think. But
> my device tree foo is very weak, so I'm not sure.
>
> CCing Robert, who touched the generic phy code last. Robert, what do
> you think?
I think your patch in [1] is correct, because
"Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt" states that
reset-gpios is optional, and because Felipe told me gpios for phy_generic are
optional.
Now the original code was written by Felipe, so better ask him first. The
original code was :
af9f51c55 phy-generic.c nop->gpio_reset = of_get_named_gpio_flags(node, "reset-gpios",
af9f51c55 phy-generic.c 0, &flags);
af9f51c55 phy-generic.c if (nop->gpio_reset == -EPROBE_DEFER)
af9f51c55 phy-generic.c return -EPROBE_DEFER;
Cheers.
--
Robert
[1]
> diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
> index dd05254..9a826ff 100644
> --- a/drivers/usb/phy/phy-generic.c
> +++ b/drivers/usb/phy/phy-generic.c
> @@ -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);
> }
next prev parent reply other threads:[~2015-01-13 9:36 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-12 15:00 [PATCH v7 0/5] Patches to add support for Rockchip usb PHYs Yunzhi Li
2014-12-12 15:00 ` Yunzhi Li
2014-12-12 15:00 ` Yunzhi Li
2014-12-12 15:00 ` [PATCH v7 1/5] Documentation: bindings: add dt documentation for Rockchip usb PHY Yunzhi Li
2014-12-12 15:07 ` [PATCH v7 2/5] phy: add a driver for the Rockchip SoC internal USB2.0 PHY Yunzhi Li
2014-12-12 15:07 ` Yunzhi Li
2014-12-12 15:07 ` Yunzhi Li
2014-12-13 0:19 ` Doug Anderson
2014-12-13 0:19 ` Doug Anderson
2014-12-13 0:19 ` Doug Anderson
2014-12-13 7:24 ` Kishon Vijay Abraham I
2014-12-13 7:24 ` Kishon Vijay Abraham I
2014-12-13 7:24 ` Kishon Vijay Abraham I
2014-12-13 23:12 ` Doug Anderson
2014-12-13 23:12 ` Doug Anderson
2014-12-13 23:12 ` Doug Anderson
2014-12-15 18:12 ` Doug Anderson
2014-12-15 18:12 ` Doug Anderson
2014-12-15 18:12 ` Doug Anderson
2015-01-21 9:48 ` Kishon Vijay Abraham I
2015-01-21 9:48 ` Kishon Vijay Abraham I
2015-01-21 9:48 ` Kishon Vijay Abraham I
2015-01-21 10:06 ` Yunzhi Li
2015-01-21 10:06 ` Yunzhi Li
2015-01-21 10:06 ` Yunzhi Li
2015-01-21 10:10 ` Kishon Vijay Abraham I
2015-01-21 10:10 ` Kishon Vijay Abraham I
2015-01-21 10:10 ` Kishon Vijay Abraham I
2015-01-21 10:21 ` Yunzhi Li
2015-01-21 10:21 ` Yunzhi Li
2014-12-12 15:09 ` [PATCH v7 3/5] usb: dwc2: add generic PHY framework support for dwc2 usb controler platform driver Yunzhi Li
2014-12-15 18:13 ` Doug Anderson
2015-01-09 2:15 ` Paul Zimmerman
2015-01-10 13:54 ` Yunzhi Li
2015-01-10 16:06 ` Yunzhi Li
2015-01-10 23:51 ` Paul Zimmerman
2015-01-13 0:54 ` Paul Zimmerman
2015-01-13 9:35 ` Robert Jarzmik [this message]
2015-01-13 15:30 ` Felipe Balbi
2014-12-12 15:12 ` [PATCH v7 4/5] ARM: dts: rockchip: add rk3288 usb PHY Yunzhi Li
2014-12-12 15:12 ` Yunzhi Li
2014-12-12 15:12 ` Yunzhi Li
2014-12-15 18:14 ` Doug Anderson
2014-12-15 18:14 ` Doug Anderson
2014-12-15 18:14 ` Doug Anderson
2014-12-12 15:17 ` [PATCH v7 5/5] ARM: dts: rockchip: Enable usb PHY on rk3288-evb board Yunzhi Li
2014-12-12 15:17 ` Yunzhi Li
2014-12-15 18:15 ` Doug Anderson
2014-12-15 18:15 ` Doug Anderson
2015-02-19 22:36 ` [PATCH v7 0/5] Patches to add support for Rockchip usb PHYs Heiko Stübner
2015-02-19 22:36 ` Heiko Stübner
2015-02-19 22:36 ` Heiko Stübner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ppajxbt3.fsf@free.fr \
--to=robert.jarzmik@free.fr \
--cc=Paul.Zimmerman@synopsys.com \
--cc=balbi@ti.com \
--cc=cf@rock-chips.com \
--cc=dianders@chromium.org \
--cc=dinguyen@opensource.altera.com \
--cc=gregkh@linuxfoundation.org \
--cc=heiko@sntech.de \
--cc=huangtao@rock-chips.com \
--cc=jwerner@chromium.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=lyz@rock-chips.com \
--cc=olof@lixom.net \
--cc=zyw@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.