Skip to contentSkip to conversation

gpu: host1x: Register child devices

PATCH New Thierry Reding 1 participant 2 messages Jun 12, 2020

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

PATCH 1/2 gpu: host1x: Register child devices

From: Thierry Reding <[email protected]>

In order to remove the dependency on the simple-bus compatible string, which causes the OF driver core to register all child devices, make the host1x driver explicitly register its children.

---
 drivers/gpu/host1x/dev.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/host1x/dev.c +6 -0
index 3c0f151847ba..d0ebb70e2fdd 100644
@@ -470,8 +470,14 @@ static int host1x_probe(struct platform_device *pdev)
 	if (err < 0)
 		goto deinit_debugfs;
 
+	err = devm_of_platform_populate(&pdev->dev);
+	if (err < 0)
+		goto unregister;
+
 	return 0;
 
+unregister:
+	host1x_unregister(host);
 deinit_debugfs:
 	host1x_debug_deinit(host);
 	host1x_intr_deinit(host);
Signature · 1 line
2.24.1
#1 lore raw

PATCH 2/2 drm/tegra: hub: Register child devices

From: Thierry Reding <[email protected]>

In order to remove the dependency on the simple-bus compatible string, which causes the OF driver core to register all child devices, make the display-hub driver explicitly register the display controller children.

---
 drivers/gpu/drm/tegra/hub.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/gpu/drm/tegra/hub.c +9 -0
index a2ef8f218d4e..22a03f7ffdc1 100644
@@ -948,6 +948,15 @@ static int tegra_display_hub_probe(struct platform_device *pdev)
 		dev_err(&pdev->dev, "failed to register host1x client: %d\n",
 			err);
 
+	err = devm_of_platform_populate(&pdev->dev);
+	if (err < 0)
+		goto unregister;
+
+	return err;
+
+unregister:
+	host1x_client_unregister(&hub->client);
+	pm_runtime_disable(&pdev->dev);
 	return err;
 }
 
Signature · 1 line
2.24.1