drm/panel: sitronix-st7789v: make reset GPIO optional

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
This commit is contained in:
Sebastian Reichel 2023-07-14 03:37:42 +02:00 committed by Neil Armstrong
parent c2974f43b1
commit b6b65e45e0

View File

@ -369,7 +369,7 @@ static int st7789v_probe(struct spi_device *spi)
if (IS_ERR(ctx->power)) if (IS_ERR(ctx->power))
return PTR_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)) { if (IS_ERR(ctx->reset)) {
dev_err(&spi->dev, "Couldn't get our reset line\n"); dev_err(&spi->dev, "Couldn't get our reset line\n");
return PTR_ERR(ctx->reset); return PTR_ERR(ctx->reset);