Skip to content

Commit

Permalink
drm/bridge: anx7625: Return -EPROBE_DEFER if the dsi host was not found
Browse files Browse the repository at this point in the history
It will connect to the mipi dsi host and find the corresponding
mipi dsi host node, but the node registered by the mipi dsi host
has not been loaded yet. of_find_mipi_dsi_host_by_node() returns -EINVAL
which causes the calling driver to fail.

If the anx7625 driver is loaded afterwards the driver requesting
the mipi dsi host will not notice this.

Better approach is to return -EPROBE_DEFER in such case.
Then when the anx7625 driver appears the driver requesting
the mipi dsi host will be probed again.

Signed-off-by: owen <qwt9588@gmail.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220117100949.9542-1-qwt9588@gamil.com
Reviewed-by: Robert Foss <robert.foss@linaro.org>
  • Loading branch information
qinwnentao authored and robertfoss committed Jan 17, 2022
1 parent 032a125 commit 2693329
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/bridge/analogix/anx7625.c
Original file line number Diff line number Diff line change
Expand Up @@ -1917,7 +1917,7 @@ static int anx7625_attach_dsi(struct anx7625_data *ctx)
host = of_find_mipi_dsi_host_by_node(ctx->pdata.mipi_host_node);
if (!host) {
DRM_DEV_ERROR(dev, "fail to find dsi host.\n");
return -EINVAL;
return -EPROBE_DEFER;
}

dsi = devm_mipi_dsi_device_register_full(dev, host, &info);
Expand Down

0 comments on commit 2693329

Please sign in to comment.