From: Peter Chen <hzpeterchen@gmail.com>
To: Stephen Boyd <stephen.boyd@linaro.org>
Cc: Peter Chen <peter.chen@nxp.com>,
gregkh@linuxfoundation.org, stern@rowland.harvard.edu,
ulf.hansson@linaro.org, broonie@kernel.org, sre@kernel.org,
robh+dt@kernel.org, shawnguo@kernel.org, k.kozlowski@samsung.com,
linux-arm-kernel@lists.infradead.org, p.zabel@pengutronix.de,
devicetree@vger.kernel.org, pawel.moll@arm.com,
mark.rutland@arm.com, linux-usb@vger.kernel.org, arnd@arndb.de,
s.hauer@pengutronix.de, mail@maciej.szmigiero.name,
troy.kisky@boundarydevices.com, festevam@gmail.com,
oscar@naiandei.net, linux-pm@vger.kernel.org,
Peter Chen <peter.chen@freescale.com>
Subject: Re: [PATCH 5/6] usb: chipidea: host: let the hcd know's parent device node
Date: Fri, 8 Jul 2016 09:54:47 +0800 [thread overview]
Message-ID: <20160708015447.GB27779@shlinux2> (raw)
In-Reply-To: <146793221122.31330.7571458363004882365@sboyd-linaro>
On Thu, Jul 07, 2016 at 03:56:51PM -0700, Stephen Boyd wrote:
> Quoting Peter Chen (2016-07-07 02:14:51)
> > diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
> > index 053bac9..55120ef 100644
> > --- a/drivers/usb/chipidea/host.c
> > +++ b/drivers/usb/chipidea/host.c
> > @@ -109,15 +109,25 @@ static int host_start(struct ci_hdrc *ci)
> > struct ehci_hcd *ehci;
> > struct ehci_ci_priv *priv;
> > int ret;
> > + struct device *dev = ci->dev;
> >
> > - if (usb_disabled())
> > + if (usb_disabled() || !dev)
>
> Does that ever happen?
I don't think so, will delete it.
>
> > return -ENODEV;
> >
> > - hcd = usb_create_hcd(&ci_ehci_hc_driver, ci->dev, dev_name(ci->dev));
> > + /*
> > + * USB Core will try to get child node under roothub,
> > + * but chipidea core has no of_node, and the child node
> > + * for controller is located at glue layer's node which
> > + * is chipidea core's parent.
> > + */
> > + if (dev->parent && dev->parent->of_node)
> > + dev->of_node = dev->parent->of_node;
>
> Why not do this during the ci device probe? How is host special for
> having an of_node for the child device.
>
Good idea. I did this when I added USB device DT support, but did not
consider potential gadget/phy use cases.
--
Best Regards,
Peter Chen
WARNING: multiple messages have this Message-ID (diff)
From: hzpeterchen@gmail.com (Peter Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/6] usb: chipidea: host: let the hcd know's parent device node
Date: Fri, 8 Jul 2016 09:54:47 +0800 [thread overview]
Message-ID: <20160708015447.GB27779@shlinux2> (raw)
In-Reply-To: <146793221122.31330.7571458363004882365@sboyd-linaro>
On Thu, Jul 07, 2016 at 03:56:51PM -0700, Stephen Boyd wrote:
> Quoting Peter Chen (2016-07-07 02:14:51)
> > diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
> > index 053bac9..55120ef 100644
> > --- a/drivers/usb/chipidea/host.c
> > +++ b/drivers/usb/chipidea/host.c
> > @@ -109,15 +109,25 @@ static int host_start(struct ci_hdrc *ci)
> > struct ehci_hcd *ehci;
> > struct ehci_ci_priv *priv;
> > int ret;
> > + struct device *dev = ci->dev;
> >
> > - if (usb_disabled())
> > + if (usb_disabled() || !dev)
>
> Does that ever happen?
I don't think so, will delete it.
>
> > return -ENODEV;
> >
> > - hcd = usb_create_hcd(&ci_ehci_hc_driver, ci->dev, dev_name(ci->dev));
> > + /*
> > + * USB Core will try to get child node under roothub,
> > + * but chipidea core has no of_node, and the child node
> > + * for controller is located at glue layer's node which
> > + * is chipidea core's parent.
> > + */
> > + if (dev->parent && dev->parent->of_node)
> > + dev->of_node = dev->parent->of_node;
>
> Why not do this during the ci device probe? How is host special for
> having an of_node for the child device.
>
Good idea. I did this when I added USB device DT support, but did not
consider potential gadget/phy use cases.
--
Best Regards,
Peter Chen
next prev parent reply other threads:[~2016-07-08 2:02 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-07 9:14 [PATCH 0/6] power: add power sequence library Peter Chen
2016-07-07 9:14 ` Peter Chen
[not found] ` <1467882892-27589-1-git-send-email-peter.chen-3arQi8VN3Tc@public.gmane.org>
2016-07-07 9:14 ` [PATCH 1/6] binding-doc: power: pwrseq-generic: add binding doc for generic " Peter Chen
2016-07-07 9:14 ` Peter Chen
[not found] ` <1467882892-27589-2-git-send-email-peter.chen-3arQi8VN3Tc@public.gmane.org>
2016-07-07 9:47 ` Philipp Zabel
2016-07-07 9:47 ` Philipp Zabel
[not found] ` <1467884834.4236.36.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2016-07-07 23:53 ` Joshua Clayton
2016-07-07 23:53 ` Joshua Clayton
2016-07-08 2:39 ` Peter Chen
2016-07-08 2:39 ` Peter Chen
2016-07-08 2:37 ` Peter Chen
2016-07-08 2:37 ` Peter Chen
2016-07-07 9:14 ` [PATCH 2/6] power: add " Peter Chen
2016-07-07 9:14 ` Peter Chen
2016-07-07 9:14 ` [PATCH 3/6] binding-doc: usb: usb-device: add optional properties for power sequence Peter Chen
2016-07-07 9:14 ` Peter Chen
2016-07-07 9:14 ` [PATCH 4/6] usb: core: add power sequence handling for USB devices Peter Chen
2016-07-07 9:14 ` Peter Chen
2016-07-07 9:14 ` [PATCH 5/6] usb: chipidea: host: let the hcd know's parent device node Peter Chen
2016-07-07 9:14 ` Peter Chen
2016-07-07 22:56 ` Stephen Boyd
2016-07-07 22:56 ` Stephen Boyd
2016-07-08 1:54 ` Peter Chen [this message]
2016-07-08 1:54 ` Peter Chen
2016-07-07 9:14 ` [PATCH 6/6] ARM: dts: imx6qdl-udoo.dtsi: fix onboard USB HUB property Peter Chen
2016-07-07 9:14 ` Peter Chen
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=20160708015447.GB27779@shlinux2 \
--to=hzpeterchen@gmail.com \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=k.kozlowski@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mail@maciej.szmigiero.name \
--cc=mark.rutland@arm.com \
--cc=oscar@naiandei.net \
--cc=p.zabel@pengutronix.de \
--cc=pawel.moll@arm.com \
--cc=peter.chen@freescale.com \
--cc=peter.chen@nxp.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=sre@kernel.org \
--cc=stephen.boyd@linaro.org \
--cc=stern@rowland.harvard.edu \
--cc=troy.kisky@boundarydevices.com \
--cc=ulf.hansson@linaro.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.