Skip to contentSkip to conversation

usb: musb: sunxi: propagate devicetree node to glue pdev

PATCH Superseded Mans Rullgard 1 participant 3 messages Feb 28, 2019 – Jun 27, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: musb: sunxi: propagate devicetree node to glue pdev

In order for devicetree nodes to be correctly associated with attached devices, the controller node needs to be propagated to the glue device.

---
This depends on 2c1ea6abde88 ("platform: set of_node in platform_device_register_full()") which is currently winding its way through the staging trees.

---
 drivers/usb/musb/sunxi.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/musb/sunxi.c +2 -0
index 832a41f9ee7d..a72665fbf111 100644
@@ -781,6 +781,8 @@ static int sunxi_musb_probe(struct platform_device *pdev)
 	pinfo.name	 = "musb-hdrc";
 	pinfo.id	= PLATFORM_DEVID_AUTO;
 	pinfo.parent	= &pdev->dev;
+	pinfo.fwnode	= of_fwnode_handle(pdev->dev.of_node);
+	pinfo.of_node_reused = true;
 	pinfo.res	= pdev->resource;
 	pinfo.num_res	= pdev->num_resources;
 	pinfo.data	= &pdata;
#1 lore raw
Quoted 8 lines · Mans Rullgard

In order for devicetree nodes to be correctly associated with attached devices, the controller node needs to be propagated to the glue device.

---
This depends on 2c1ea6abde88 ("platform: set of_node in platform_device_register_full()") which is currently winding its way through the staging trees.

That patch is now in next.

Quoted 20 lines
---
 drivers/usb/musb/sunxi.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/musb/sunxi.c +2 -0
index 832a41f9ee7d..a72665fbf111 100644
@@ -781,6 +781,8 @@ static int sunxi_musb_probe(struct platform_device *pdev)
 	pinfo.name	 = "musb-hdrc";
 	pinfo.id	= PLATFORM_DEVID_AUTO;
 	pinfo.parent	= &pdev->dev;
+	pinfo.fwnode	= of_fwnode_handle(pdev->dev.of_node);
+	pinfo.of_node_reused = true;
 	pinfo.res	= pdev->resource;
 	pinfo.num_res	= pdev->num_resources;
 	pinfo.data	= &pdata;
Signature · 1 line
2.20.1
#2 lore raw
In reply to Mans Rullgard
Quoted 8 lines · Mans Rullgard

In order for devicetree nodes to be correctly associated with attached devices, the controller node needs to be propagated to the glue device.

---
This depends on 2c1ea6abde88 ("platform: set of_node in platform_device_register_full()") which is currently winding its way through the staging trees.

That patch is in v5.1, so this one can go ahead now. Assuming there are no objections, of course.

Quoted 20 lines
---
 drivers/usb/musb/sunxi.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/musb/sunxi.c +2 -0
index 832a41f9ee7d..a72665fbf111 100644
@@ -781,6 +781,8 @@ static int sunxi_musb_probe(struct platform_device *pdev)
 	pinfo.name	 = "musb-hdrc";
 	pinfo.id	= PLATFORM_DEVID_AUTO;
 	pinfo.parent	= &pdev->dev;
+	pinfo.fwnode	= of_fwnode_handle(pdev->dev.of_node);
+	pinfo.of_node_reused = true;
 	pinfo.res	= pdev->resource;
 	pinfo.num_res	= pdev->num_resources;
 	pinfo.data	= &pdata;
Signature · 1 line
2.20.1
Signature · 1 line
Måns Rullgård