Thread (57 messages) 57 messages, 14 authors, 2d ago

Re: [PATCH 20/23] usb: chipidea: use platform_device_set_of_node_from_dev()

From: "Peter Chen (CIX)" <peter.chen@kernel.org>
Date: 2026-06-05 07:00:09
Also in: dri-devel, driver-core, imx, intel-xe, linux-arm-msm, linux-devicetree, linux-i2c, linux-iommu, linux-mips, linux-pm, linux-sound, linux-usb, lkml, netdev, platform-driver-x86

On 26-06-04 08:34:16, Bartosz Golaszewski wrote:
On Tue, 2 Jun 2026 23:49:29 +0200, Andy Shevchenko
[off-list ref] said:
quoted
On Thu, May 21, 2026 at 10:36:43AM +0200, Bartosz Golaszewski wrote:
quoted
Ahead of reworking the reference counting logic for platform devices,
encapsulate the assignment of the OF node from another device for
dynamically allocated platform devices with the provided helper.
...
quoted
 	pdev->dev.parent = dev;
-	device_set_of_node_from_dev(&pdev->dev, dev);
+	platform_device_set_of_node_from_dev(pdev, dev);
Why do they even do that? Do they have a USB connected pin control?
I don't know. I can't test it so I don't want to break it. If they don't need
it, the person who can test it, can remove it later.
It was introduced by below commits:

commit 0f153a1b8193ce768be4df0400aeb2c8f2a3b3da
Author: Rob Herring [off-list ref]
Date:   Wed Dec 15 16:56:46 2021 -0600

    usb: chipidea: Set the DT node on the child device

    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.

    Acked-by: Peter Chen [off-list ref]
    Signed-off-by: Rob Herring [off-list ref]
    Link: https://lore.kernel.org/r/20211215225646.1997946-1-robh@kernel.org (local)
    Signed-off-by: Greg Kroah-Hartman [off-list ref]


-- 

Best regards,
Peter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help