Commit 94146121 authored by Andy Yan's avatar Andy Yan Committed by Neil Armstrong
Browse files

drivers/panel: raydium-rm67200: Make reset-gpio optional



Although the datasheet of the panel module describes that it has a
reset pin, in the actual hardware design, we often use an RC circuit
to control the reset, and rarely use GPIO to control the reset. This
is the way it is done on our numerous development boards (such as
RK3568/RK3576 EVB).

So make the reset-gpio optional.

Signed-off-by: default avatarAndy Yan <andy.yan@rock-chips.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250616070536.670519-2-andyshrk@163.com
parent 7513437b
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ static inline struct raydium_rm67200 *to_raydium_rm67200(struct drm_panel *panel

static void raydium_rm67200_reset(struct raydium_rm67200 *ctx)
{
	if (ctx->reset_gpio) {
		gpiod_set_value_cansleep(ctx->reset_gpio, 0);
		msleep(60);
		gpiod_set_value_cansleep(ctx->reset_gpio, 1);
@@ -43,6 +44,7 @@ static void raydium_rm67200_reset(struct raydium_rm67200 *ctx)
		gpiod_set_value_cansleep(ctx->reset_gpio, 0);
		msleep(60);
	}
}

static void raydium_rm67200_write(struct mipi_dsi_multi_context *ctx,
				  u8 arg1, u8 arg2)
@@ -409,7 +411,7 @@ static int raydium_rm67200_probe(struct mipi_dsi_device *dsi)
	if (ret < 0)
		return ret;

	ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
	ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
	if (IS_ERR(ctx->reset_gpio))
		return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
				     "Failed to get reset-gpios\n");