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 1:54 UTC|newest]
Thread overview: 13+ 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 ` [PATCH 1/6] binding-doc: power: pwrseq-generic: add binding doc for generic " Peter Chen
2016-07-07 9:47 ` Philipp Zabel
2016-07-07 23:53 ` Joshua Clayton
2016-07-08 2:39 ` 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 ` [PATCH 3/6] binding-doc: usb: usb-device: add optional properties for power sequence 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 ` [PATCH 5/6] usb: chipidea: host: let the hcd know's parent device node Peter Chen
2016-07-07 22:56 ` Stephen Boyd
2016-07-08 1:54 ` Peter Chen [this message]
2016-07-07 9:14 ` [PATCH 6/6] ARM: dts: imx6qdl-udoo.dtsi: fix onboard USB HUB property 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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).