summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/bridge
diff options
context:
space:
mode:
authorDouglas Anderson <dianders@chromium.org>2021-04-23 09:58:54 -0700
committerDouglas Anderson <dianders@chromium.org>2021-05-03 13:21:08 -0700
commitbef236a5206c49572899c999d601ac9100c1a6ba (patch)
tree2b02a17297bb64d58e6546f1c4d31ce0964c5617 /drivers/gpu/drm/bridge
parentf94eb8a328633f2fc6af358d0ad7e9c8af3e26f6 (diff)
drm/bridge: ti-sn65dsi86: Move all the chip-related init to the start
This is just code motion of the probe routine to move all the things that are for the "whole chip" (instead of the GPIO parts or the MIPI-to-eDP parts) together at the start of probe. This is in preparation for breaking the driver into sub-drivers. Since we're using devm for all of the "whole chip" stuff this is actually quite easy now. Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.8.Ide8ba40feb2e43bc98a11edbb08d696d62dcd83e@changeid
Diffstat (limited to 'drivers/gpu/drm/bridge')
-rw-r--r--drivers/gpu/drm/bridge/ti-sn65dsi86.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
index 0389e1f035bd..5ce6b1142703 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
@@ -1255,12 +1255,6 @@ static int ti_sn65dsi86_probe(struct i2c_client *client,
return PTR_ERR(pdata->regmap);
}
- ret = drm_of_find_panel_or_bridge(dev->of_node, 1, 0, &pdata->panel, NULL);
- if (ret) {
- DRM_ERROR("could not find any panel node\n");
- return ret;
- }
-
pdata->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW);
if (IS_ERR(pdata->enable_gpio)) {
DRM_ERROR("failed to get enable gpio from DT\n");
@@ -1268,8 +1262,6 @@ static int ti_sn65dsi86_probe(struct i2c_client *client,
return ret;
}
- ti_sn_bridge_parse_lanes(pdata, dev->of_node);
-
ret = ti_sn65dsi86_parse_regulators(pdata);
if (ret) {
DRM_ERROR("failed to parse regulators\n");
@@ -1280,12 +1272,22 @@ static int ti_sn65dsi86_probe(struct i2c_client *client,
if (IS_ERR(pdata->refclk))
return PTR_ERR(pdata->refclk);
- ret = ti_sn_bridge_parse_dsi_host(pdata);
+ pm_runtime_enable(dev);
+ ret = devm_add_action_or_reset(dev, ti_sn65dsi86_runtime_disable, dev);
if (ret)
return ret;
- pm_runtime_enable(dev);
- ret = devm_add_action_or_reset(dev, ti_sn65dsi86_runtime_disable, dev);
+ ti_sn65dsi86_debugfs_init(pdata);
+
+ ret = drm_of_find_panel_or_bridge(dev->of_node, 1, 0, &pdata->panel, NULL);
+ if (ret) {
+ DRM_ERROR("could not find any panel node\n");
+ return ret;
+ }
+
+ ti_sn_bridge_parse_lanes(pdata, dev->of_node);
+
+ ret = ti_sn_bridge_parse_dsi_host(pdata);
if (ret)
return ret;
@@ -1303,8 +1305,6 @@ static int ti_sn65dsi86_probe(struct i2c_client *client,
drm_bridge_add(&pdata->bridge);
- ti_sn65dsi86_debugfs_init(pdata);
-
return 0;
}