@@ -1712,7 +1712,7 @@ static int exynos_dsi_bind(struct device *dev, struct device *master,
of_node_put(in_bridge_node);
}
- return mipi_dsi_host_register(&dsi->dsi_host);
+ return 0;
}
static void exynos_dsi_unbind(struct device *dev, struct device *master,
@@ -1722,8 +1722,6 @@ static void exynos_dsi_unbind(struct device *dev, struct device *master,
struct drm_encoder *encoder = &dsi->encoder;
exynos_dsi_disable(encoder);
-
- mipi_dsi_host_unregister(&dsi->dsi_host);
}
static const struct component_ops exynos_dsi_component_ops = {
@@ -1818,11 +1816,16 @@ static struct exynos_dsi *__exynos_dsi_probe(struct platform_device *pdev)
if (ret)
return ERR_PTR(ret);
+ ret = mipi_dsi_host_register(&dsi->dsi_host);
+ if (ret)
+ return ERR_PTR(ret);
+
return dsi;
}
static void __exynos_dsi_remove(struct exynos_dsi *dsi)
{
+ mipi_dsi_host_unregister(&dsi->dsi_host);
}
static int exynos_dsi_probe(struct platform_device *pdev)
Once the driver implements a drm_bridge, the bridge will be attached during bind. The driver has to register the mipi dsi host before making the driver available at the component framework, because the bridge is only initialized when a mipi dsi device attaches. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> --- v2: none --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)