@@ -1254,12 +1254,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");
@@ -1267,8 +1261,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");
@@ -1279,12 +1271,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;
@@ -1302,8 +1304,6 @@ static int ti_sn65dsi86_probe(struct i2c_client *client,
drm_bridge_add(&pdata->bridge);
- ti_sn65dsi86_debugfs_init(pdata);
-
return 0;
}