summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2021-10-25 17:15:21 +0200
committerFrancesco Dolcini <francesco.dolcini@toradex.com>2023-04-18 12:18:23 +0200
commit10e16f5f41968a76c29b9a6092aca461773d04ed (patch)
treeb5d88de04e86241e15252e7454d6d236919efc5a
parentea0fa3f6a1114522599e553c9b8d1b1a404152c7 (diff)
drm/bridge: lt8912b: Register and attach our DSI device at probe
In order to avoid any probe ordering issue, the best practice is to move the secondary MIPI-DSI device registration and attachment to the MIPI-DSI host at probe time. Let's do this. Upstream-Status: Backport [d89078c37b10f05fa4f4791b71db2572db361b68] Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20211025151536.1048186-7-maxime@cerno.tech
-rw-r--r--drivers/gpu/drm/bridge/lontium-lt8912b.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/bridge/lontium-lt8912b.c b/drivers/gpu/drm/bridge/lontium-lt8912b.c
index 48dd4b8049f2..9dafe38b7b90 100644
--- a/drivers/gpu/drm/bridge/lontium-lt8912b.c
+++ b/drivers/gpu/drm/bridge/lontium-lt8912b.c
@@ -544,10 +544,6 @@ static int lt8912_bridge_attach(struct drm_bridge *bridge,
if (ret)
goto error;
- ret = lt8912_attach_dsi(lt);
- if (ret)
- goto error;
-
lt->is_attached = true;
return 0;
@@ -706,8 +702,15 @@ static int lt8912_probe(struct i2c_client *client,
drm_bridge_add(&lt->bridge);
+ ret = lt8912_attach_dsi(lt);
+ if (ret)
+ goto err_attach;
+
return 0;
+err_attach:
+ drm_bridge_remove(&lt->bridge);
+ lt8912_free_i2c(lt);
err_i2c:
lt8912_put_dt(lt);
err_dt_parse: