Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1459211

Re: [PATCH v5 5/6] usb: chipidea: let chipidea core device of_node equal's glue layer device of_node

From Stephen Boyd <stephen.boyd@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v5 5/6] usb: chipidea: let chipidea core device of_node equal's glue layer device of_node
Date 2016-08-10 02:20 +0200
Message-ID <s4ppv-6cf-7@gated-at.bofh.it> (permalink)
References <s435D-aT-5@gated-at.bofh.it> <s4ppv-6cf-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Quoting Peter Chen (2016-08-08 01:52:10)
> From: Peter Chen <peter.chen@freescale.com>
> 
> At device tree, we have no device node for chipidea core,
> the glue layer's node is the parent node for host and udc
> device. But in related driver, the parent device is chipidea
> core. So, in order to let the common driver get parent's node,
> we let the core's device node equals glue layer device node.
> 
> Signed-off-by: Peter Chen <peter.chen@freescale.com>
> Tested-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
> Tested-by Joshua Clayton <stillcompiling@gmail.com>
> ---
>  drivers/usb/chipidea/core.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> index 69426e6..b189dc7 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
> @@ -954,6 +954,15 @@ static int ci_hdrc_probe(struct platform_device *pdev)
>                 dev_err(dev, "unable to init phy: %d\n", ret);
>                 return ret;
>         }
> +       /*
> +        * At device tree, we have no device node for chipidea core,
> +        * the glue layer's node is the parent node for host and udc
> +        * device. But in related driver, the parent device is chipidea
> +        * core. So, in order to let the common driver get parent's node,
> +        * we let the core's device node equals glue layer's node.
> +        */
> +       if (dev->parent && dev->parent->of_node)
> +               dev->of_node = dev->parent->of_node;

Can this be done earlier? Perhaps after hw_device_init() in this probe
routine? That would allow me to remove the awkward parent searching in
my ULPI DT awareness patch.

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH v5 5/6] usb: chipidea: let chipidea core device of_node equal's  glue layer device of_node Stephen Boyd <stephen.boyd@linaro.org> - 2016-08-10 02:20 +0200
  Re: [PATCH v5 5/6] usb: chipidea: let chipidea core device of_node  equal's glue layer device of_node Peter Chen <hzpeterchen@gmail.com> - 2016-08-10 05:30 +0200
    Re: [PATCH v5 5/6] usb: chipidea: let chipidea core device of_node  equal's glue layer device of_node Peter Chen <hzpeterchen@gmail.com> - 2016-08-10 22:20 +0200

csiph-web