From: peter.chen@freescale.com (Peter Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7 07/13] usb: chipidea: fix phy handling
Date: Mon, 17 Nov 2014 13:53:39 +0800 [thread overview]
Message-ID: <20141117055338.GC30017@shlinux2> (raw)
In-Reply-To: <1415978763-27345-8-git-send-email-antoine.tenart@free-electrons.com>
On Fri, Nov 14, 2014 at 04:25:57PM +0100, Antoine Tenart wrote:
> The generic platform device for CI drivers is probed by calling
> ci_hdrc_probe. This is not the same device as the one for the specific
> driver, so the of_node isn't the one we're looking into.
>
> This result in not being able to probe the phys. Since all CI driver are
> retrieving their phys in the specific code, this didn't impact any of
> them yet.
>
> Fixes it using the right of node pointer, by using dev->parent instead
> of dev in phy get functions.
It is a correct fix, but the description need to be refined, it is
not related to "of_node" or "node", it is related child/parent device.
>
> Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
> ---
> drivers/usb/chipidea/core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> index ba0ac2723098..36318c85ad65 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
> @@ -654,8 +654,8 @@ static int ci_hdrc_probe(struct platform_device *pdev)
> } else if (ci->platdata->usb_phy) {
> ci->usb_phy = ci->platdata->usb_phy;
> } else {
> - ci->phy = devm_phy_get(dev, "usb-phy");
> - ci->usb_phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
> + ci->phy = devm_phy_get(dev->parent, "usb-phy");
> + ci->usb_phy = devm_usb_get_phy(dev->parent, USB_PHY_TYPE_USB2);
>
> /* if both generic PHY and USB PHY layers aren't enabled */
> if (PTR_ERR(ci->phy) == -ENOSYS &&
> --
> 2.1.0
>
--
Best Regards,
Peter Chen
WARNING: multiple messages have this Message-ID (diff)
From: Peter Chen <peter.chen@freescale.com>
To: Antoine Tenart <antoine.tenart@free-electrons.com>
Cc: sebastian.hesselbarth@gmail.com, balbi@ti.com,
p.zabel@pengutronix.de, alexandre.belloni@free-electrons.com,
thomas.petazzoni@free-electrons.com, zmxu@marvell.com,
jszhang@marvell.com, linux-arm-kernel@lists.infradead.org,
linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 07/13] usb: chipidea: fix phy handling
Date: Mon, 17 Nov 2014 13:53:39 +0800 [thread overview]
Message-ID: <20141117055338.GC30017@shlinux2> (raw)
In-Reply-To: <1415978763-27345-8-git-send-email-antoine.tenart@free-electrons.com>
On Fri, Nov 14, 2014 at 04:25:57PM +0100, Antoine Tenart wrote:
> The generic platform device for CI drivers is probed by calling
> ci_hdrc_probe. This is not the same device as the one for the specific
> driver, so the of_node isn't the one we're looking into.
>
> This result in not being able to probe the phys. Since all CI driver are
> retrieving their phys in the specific code, this didn't impact any of
> them yet.
>
> Fixes it using the right of node pointer, by using dev->parent instead
> of dev in phy get functions.
It is a correct fix, but the description need to be refined, it is
not related to "of_node" or "node", it is related child/parent device.
>
> Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
> ---
> drivers/usb/chipidea/core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> index ba0ac2723098..36318c85ad65 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
> @@ -654,8 +654,8 @@ static int ci_hdrc_probe(struct platform_device *pdev)
> } else if (ci->platdata->usb_phy) {
> ci->usb_phy = ci->platdata->usb_phy;
> } else {
> - ci->phy = devm_phy_get(dev, "usb-phy");
> - ci->usb_phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
> + ci->phy = devm_phy_get(dev->parent, "usb-phy");
> + ci->usb_phy = devm_usb_get_phy(dev->parent, USB_PHY_TYPE_USB2);
>
> /* if both generic PHY and USB PHY layers aren't enabled */
> if (PTR_ERR(ci->phy) == -ENOSYS &&
> --
> 2.1.0
>
--
Best Regards,
Peter Chen
WARNING: multiple messages have this Message-ID (diff)
From: Peter Chen <peter.chen@freescale.com>
To: Antoine Tenart <antoine.tenart@free-electrons.com>
Cc: <sebastian.hesselbarth@gmail.com>, <balbi@ti.com>,
<p.zabel@pengutronix.de>, <alexandre.belloni@free-electrons.com>,
<thomas.petazzoni@free-electrons.com>, <zmxu@marvell.com>,
<jszhang@marvell.com>, <linux-arm-kernel@lists.infradead.org>,
<linux-usb@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v7 07/13] usb: chipidea: fix phy handling
Date: Mon, 17 Nov 2014 13:53:39 +0800 [thread overview]
Message-ID: <20141117055338.GC30017@shlinux2> (raw)
In-Reply-To: <1415978763-27345-8-git-send-email-antoine.tenart@free-electrons.com>
On Fri, Nov 14, 2014 at 04:25:57PM +0100, Antoine Tenart wrote:
> The generic platform device for CI drivers is probed by calling
> ci_hdrc_probe. This is not the same device as the one for the specific
> driver, so the of_node isn't the one we're looking into.
>
> This result in not being able to probe the phys. Since all CI driver are
> retrieving their phys in the specific code, this didn't impact any of
> them yet.
>
> Fixes it using the right of node pointer, by using dev->parent instead
> of dev in phy get functions.
It is a correct fix, but the description need to be refined, it is
not related to "of_node" or "node", it is related child/parent device.
>
> Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
> ---
> drivers/usb/chipidea/core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> index ba0ac2723098..36318c85ad65 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
> @@ -654,8 +654,8 @@ static int ci_hdrc_probe(struct platform_device *pdev)
> } else if (ci->platdata->usb_phy) {
> ci->usb_phy = ci->platdata->usb_phy;
> } else {
> - ci->phy = devm_phy_get(dev, "usb-phy");
> - ci->usb_phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
> + ci->phy = devm_phy_get(dev->parent, "usb-phy");
> + ci->usb_phy = devm_usb_get_phy(dev->parent, USB_PHY_TYPE_USB2);
>
> /* if both generic PHY and USB PHY layers aren't enabled */
> if (PTR_ERR(ci->phy) == -ENOSYS &&
> --
> 2.1.0
>
--
Best Regards,
Peter Chen
next prev parent reply other threads:[~2014-11-17 5:53 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 15:25 [PATCH v7 00/13] ARM: berlin: USB support Antoine Tenart
2014-11-14 15:25 ` Antoine Tenart
2014-11-14 15:25 ` [PATCH v7 01/13] reset: add the Berlin reset controller driver Antoine Tenart
2014-11-14 15:25 ` Antoine Tenart
2014-11-14 15:25 ` [PATCH v7 02/13] Documentation: bindings: add reset bindings docs for Marvell Berlin SoCs Antoine Tenart
2014-11-14 15:25 ` Antoine Tenart
2014-11-14 15:25 ` [PATCH v7 03/13] ARM: Berlin: select the reset controller Antoine Tenart
2014-11-14 15:25 ` Antoine Tenart
2014-11-14 15:25 ` Antoine Tenart
2014-11-14 15:33 ` Arnd Bergmann
2014-11-14 15:33 ` Arnd Bergmann
2014-11-14 15:33 ` Arnd Bergmann
2014-11-14 15:36 ` Sebastian Hesselbarth
2014-11-14 15:36 ` Sebastian Hesselbarth
2014-11-14 15:36 ` Sebastian Hesselbarth
2014-11-14 17:28 ` Antoine Tenart
2014-11-14 17:28 ` Antoine Tenart
2014-11-14 17:28 ` Antoine Tenart
2014-11-14 19:07 ` Sebastian Hesselbarth
2014-11-14 19:07 ` Sebastian Hesselbarth
2014-11-14 15:25 ` [PATCH v7 04/13] ARM: dts: berlin: add a required reset property in the chip controller node Antoine Tenart
2014-11-14 15:25 ` Antoine Tenart
2014-11-14 15:25 ` Antoine Tenart
2014-11-14 15:25 ` [PATCH v7 05/13] phy: add the Berlin USB PHY driver Antoine Tenart
2014-11-14 15:25 ` Antoine Tenart
2014-11-14 15:25 ` Antoine Tenart
2014-11-14 15:25 ` [PATCH v7 06/13] Documentation: bindings: add doc for the Berlin USB PHY Antoine Tenart
2014-11-14 15:25 ` Antoine Tenart
2014-11-14 15:25 ` [PATCH v7 07/13] usb: chipidea: fix phy handling Antoine Tenart
2014-11-14 15:25 ` Antoine Tenart
2014-11-14 15:25 ` Antoine Tenart
2014-11-17 5:53 ` Peter Chen [this message]
2014-11-17 5:53 ` Peter Chen
2014-11-17 5:53 ` Peter Chen
2014-11-14 15:25 ` [PATCH v7 08/13] usb: chipidea: add a usb2 driver for ci13xxx Antoine Tenart
2014-11-14 15:25 ` Antoine Tenart
2014-11-14 21:08 ` Felipe Balbi
2014-11-14 21:08 ` Felipe Balbi
2014-11-14 21:08 ` Felipe Balbi
2014-11-14 21:10 ` Antoine Tenart
2014-11-14 21:10 ` Antoine Tenart
2014-11-14 21:10 ` Antoine Tenart
2014-11-14 21:13 ` Felipe Balbi
2014-11-14 21:13 ` Felipe Balbi
2014-11-14 21:13 ` Felipe Balbi
2014-11-17 10:01 ` Antoine Tenart
2014-11-17 10:01 ` Antoine Tenart
2014-11-17 10:01 ` Antoine Tenart
2014-11-17 5:40 ` Peter Chen
2014-11-17 5:40 ` Peter Chen
2014-11-17 5:40 ` Peter Chen
2014-11-14 15:25 ` [PATCH v7 09/13] Documentation: bindings: add doc for the USB2 ChipIdea USB driver Antoine Tenart
2014-11-14 15:25 ` Antoine Tenart
2014-11-17 5:54 ` Peter Chen
2014-11-17 5:54 ` Peter Chen
2014-11-17 5:54 ` Peter Chen
2014-11-14 15:26 ` [PATCH v7 10/13] ARM: dts: berlin: add BG2Q nodes for USB support Antoine Tenart
2014-11-14 15:26 ` Antoine Tenart
2014-11-14 15:26 ` [PATCH v7 11/13] ARM: dts: Berlin: enable USB on the BG2Q DMP Antoine Tenart
2014-11-14 15:26 ` Antoine Tenart
2014-11-14 18:47 ` Sergei Shtylyov
2014-11-14 18:47 ` Sergei Shtylyov
2014-11-14 21:14 ` Antoine Tenart
2014-11-14 21:14 ` Antoine Tenart
2014-11-14 15:26 ` [PATCH v7 12/13] ARM: dts: berlin: add BG2CD nodes for USB support Antoine Tenart
2014-11-14 15:26 ` Antoine Tenart
2014-11-14 15:26 ` [PATCH v7 13/13] ARM: dts: berlin: enable USB on the Google Chromecast Antoine Tenart
2014-11-14 15:26 ` Antoine Tenart
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=20141117055338.GC30017@shlinux2 \
--to=peter.chen@freescale.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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.