diff options
author | Michael Tretter <m.tretter@pengutronix.de> | 2020-09-11 15:54:02 +0200 |
---|---|---|
committer | Lucas Stach <l.stach@pengutronix.de> | 2021-07-21 22:27:08 +0200 |
commit | c6a13c326b37c7149fed64604f68462835caaeaf (patch) | |
tree | 259dcf403a819ae7f493277346405b4e2eb7dc16 | |
parent | 1123b6b2020875437e1766763b66a0d9b5988ea2 (diff) | |
download | linux-c6a13c326b37c7149fed64604f68462835caaeaf.tar.gz linux-c6a13c326b37c7149fed64604f68462835caaeaf.tar.xz |
drm/exynos: move dsi host registration to probe
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>
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_dsi.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 37ab7cb0f4fd..e130dd3ace06 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1711,7 +1711,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, @@ -1721,8 +1721,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 = { @@ -1812,11 +1810,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) |