Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: stephen.boyd@linaro.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/6] usb: chipidea: host: let the hcd know's parent device node
Date: Thu, 07 Jul 2016 15:56:51 -0700	[thread overview]
Message-ID: <146793221122.31330.7571458363004882365@sboyd-linaro> (raw)
In-Reply-To: <1467882892-27589-6-git-send-email-peter.chen@nxp.com>

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?

>                 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.

Doing that would also make my ULPI bus DT discovery patch simpler
because we wouldn't have to search the parent of the parent for a DT
node to find the ULPI node that's a child of the ci glue device.

  reply	other threads:[~2016-07-07 22:56 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 [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

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=146793221122.31330.7571458363004882365@sboyd-linaro \
    --to=stephen.boyd@linaro.org \
    --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