drm/panel: sitronix-st7789v: make reset GPIO optional
authorSebastian Reichel <sre@kernel.org>
Fri, 14 Jul 2023 01:37:42 +0000 (03:37 +0200)
committerNeil Armstrong <neil.armstrong@linaro.org>
Tue, 1 Aug 2023 08:29:54 +0000 (10:29 +0200)
The reset pin might not be software controllable from the SoC,
so make it optional.

Reviewed-by: Michael Riesch <michael.riesch@wolfvision.net>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230714013756.1546769-6-sre@kernel.org
drivers/gpu/drm/panel/panel-sitronix-st7789v.c

index f756655..1d43b8c 100644 (file)
@@ -369,7 +369,7 @@ static int st7789v_probe(struct spi_device *spi)
        if (IS_ERR(ctx->power))
                return PTR_ERR(ctx->power);
 
-       ctx->reset = devm_gpiod_get(&spi->dev, "reset", GPIOD_OUT_LOW);
+       ctx->reset = devm_gpiod_get_optional(&spi->dev, "reset", GPIOD_OUT_LOW);
        if (IS_ERR(ctx->reset)) {
                dev_err(&spi->dev, "Couldn't get our reset line\n");
                return PTR_ERR(ctx->reset);