]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/bridge: ti-sn65dsi83: add more dev_err_probe
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Tue, 14 Jun 2022 09:58:34 +0000 (11:58 +0200)
committerRobert Foss <robert.foss@linaro.org>
Mon, 20 Jun 2022 20:00:08 +0000 (22:00 +0200)
Add more warning/debug messages during probe. E.g. a single -EPROBE_DEFER
might have several causes, these messages help finding the origin.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220614095835.1398708-1-alexander.stein@ew.tq-group.com
Reviewed-by: Robert Foss <robert.foss@linaro.org>
drivers/gpu/drm/bridge/ti-sn65dsi83.c

index b27c0d7c451adc05b4dfa95a5fd4a02cc0d1da7e..a306150a802785f5890b594ff52a10044e90f838 100644 (file)
@@ -677,7 +677,7 @@ static int sn65dsi83_probe(struct i2c_client *client,
        ctx->enable_gpio = devm_gpiod_get_optional(ctx->dev, "enable",
                                                   GPIOD_OUT_LOW);
        if (IS_ERR(ctx->enable_gpio))
-               return PTR_ERR(ctx->enable_gpio);
+               return dev_err_probe(dev, PTR_ERR(ctx->enable_gpio), "failed to get enable GPIO\n");
 
        usleep_range(10000, 11000);
 
@@ -687,7 +687,7 @@ static int sn65dsi83_probe(struct i2c_client *client,
 
        ctx->regmap = devm_regmap_init_i2c(client, &sn65dsi83_regmap_config);
        if (IS_ERR(ctx->regmap))
-               return PTR_ERR(ctx->regmap);
+               return dev_err_probe(dev, PTR_ERR(ctx->regmap), "failed to get regmap\n");
 
        dev_set_drvdata(dev, ctx);
        i2c_set_clientdata(client, ctx);