drm/bridge: tc358775: make standby GPIO optional
authorMichael Walle <mwalle@kernel.org>
Sun, 25 Feb 2024 06:19:34 +0000 (08:19 +0200)
committerRobert Foss <rfoss@kernel.org>
Tue, 23 Apr 2024 15:32:53 +0000 (17:32 +0200)
The stby pin is optional. It is only needed for power-up and down
sequencing. It is not needed, if the power rails cannot by dynamically
enabled.

Because the GPIO is now optional, remove the error message.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240225062008.33191-6-tony@atomide.com
drivers/gpu/drm/bridge/tc358775.c

index c737670631929a5bfb22fce5dbd573d839e80544..35e78b58a39c10dabbde33f52c1382cf712551c7 100644 (file)
@@ -667,12 +667,9 @@ static int tc_probe(struct i2c_client *client)
                return ret;
        }
 
-       tc->stby_gpio = devm_gpiod_get(dev, "stby", GPIOD_OUT_HIGH);
-       if (IS_ERR(tc->stby_gpio)) {
-               ret = PTR_ERR(tc->stby_gpio);
-               dev_err(dev, "cannot get stby-gpio %d\n", ret);
-               return ret;
-       }
+       tc->stby_gpio = devm_gpiod_get_optional(dev, "stby", GPIOD_OUT_HIGH);
+       if (IS_ERR(tc->stby_gpio))
+               return PTR_ERR(tc->stby_gpio);
 
        tc->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
        if (IS_ERR(tc->reset_gpio)) {