drm/bridge: ti-sn65dsi83: Make enable GPIO optional
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Mon, 13 Dec 2021 13:36:24 +0000 (14:36 +0100)
committerRobert Foss <robert.foss@linaro.org>
Tue, 21 Dec 2021 17:43:14 +0000 (18:43 +0100)
The enable signal may not be controllable by the kernel. Make it
optional.
This is a similar to commit bbda1704fc15 ("drm/bridge: ti-sn65dsi86: Make
enable GPIO optional")

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
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/20211213133626.2498056-3-alexander.stein@ew.tq-group.com
drivers/gpu/drm/bridge/ti-sn65dsi83.c

index 945f08de45f1dede2d669beb9b39ada57e6b2639..065610edc37accb0d6d85f805b1a8855e3a721fb 100644 (file)
@@ -662,7 +662,8 @@ static int sn65dsi83_probe(struct i2c_client *client,
        }
 
        /* Put the chip in reset, pull EN line low, and assure 10ms reset low timing. */
-       ctx->enable_gpio = devm_gpiod_get(ctx->dev, "enable", GPIOD_OUT_LOW);
+       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);