* [PATCH] usb: chipidea: Set the DT node on the child device
@ 2021-12-15 22:56 Rob Herring
2021-12-16 14:12 ` Peter Chen
0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2021-12-15 22:56 UTC (permalink / raw)
To: Peter Chen, Greg Kroah-Hartman; +Cc: Lad Prabhakar, linux-usb, linux-kernel
The ChipIdea glue drivers just copy the glue resources to the "ci_hdrc"
child device. Instead, set the child device's DT node pointer to the
parent device's node so that platform_get_irq() can find the IRQ
resources in the DT. This removes the need for statically populating the
IRQ resources from the DT which has been deprecated for some time.
Signed-off-by: Rob Herring <robh@kernel.org>
---
drivers/usb/chipidea/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index a56f06368d14..5359b2a2e4d2 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -864,6 +864,7 @@ struct platform_device *ci_hdrc_add_device(struct device *dev,
}
pdev->dev.parent = dev;
+ device_set_of_node_from_dev(&pdev->dev, dev);
ret = platform_device_add_resources(pdev, res, nres);
if (ret)
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: chipidea: Set the DT node on the child device
2021-12-15 22:56 [PATCH] usb: chipidea: Set the DT node on the child device Rob Herring
@ 2021-12-16 14:12 ` Peter Chen
0 siblings, 0 replies; 2+ messages in thread
From: Peter Chen @ 2021-12-16 14:12 UTC (permalink / raw)
To: Rob Herring; +Cc: Greg Kroah-Hartman, Lad Prabhakar, linux-usb, linux-kernel
On 21-12-15 16:56:46, Rob Herring wrote:
> The ChipIdea glue drivers just copy the glue resources to the "ci_hdrc"
> child device. Instead, set the child device's DT node pointer to the
> parent device's node so that platform_get_irq() can find the IRQ
> resources in the DT. This removes the need for statically populating the
> IRQ resources from the DT which has been deprecated for some time.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Peter Chen <peter.chen@kernel.org>
> ---
> drivers/usb/chipidea/core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> index a56f06368d14..5359b2a2e4d2 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
> @@ -864,6 +864,7 @@ struct platform_device *ci_hdrc_add_device(struct device *dev,
> }
>
> pdev->dev.parent = dev;
> + device_set_of_node_from_dev(&pdev->dev, dev);
>
> ret = platform_device_add_resources(pdev, res, nres);
> if (ret)
> --
> 2.32.0
>
--
Thanks,
Peter Chen
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-16 14:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15 22:56 [PATCH] usb: chipidea: Set the DT node on the child device Rob Herring
2021-12-16 14:12 ` Peter Chen
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).