From: Guido Günther <[email protected]> No need to have a separate visionox_rm69299_power_off() helper now that visionox_rm69299_unprepare() only handles powering off the panel.
Signed-off-by: Guido Günther <[email protected]> [David: only fold power_off() into unprepare(), keeping power_on() in prepare()] Signed-off-by: David Heidelberg <[email protected]> --- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-visionox-rm69299.c b/drivers/gpu/drm/panel/panel-visionox-rm69299.c index bca1004656e45..54005d4660c33 100644 --- a/drivers/gpu/drm/panel/panel-visionox-rm69299.c +++ b/drivers/gpu/drm/panel/panel-visionox-rm69299.c @@ -176,24 +176,16 @@ static int visionox_rm69299_power_on(struct visionox_rm69299 *ctx) gpiod_set_value(ctx->reset_gpio, 0); usleep_range(10000, 20000); gpiod_set_value(ctx->reset_gpio, 1); usleep_range(10000, 20000); return 0; } -static int visionox_rm69299_power_off(struct visionox_rm69299 *ctx) -{ - gpiod_set_value(ctx->reset_gpio, 0); - - return regulator_bulk_disable(ARRAY_SIZE(visionox_rm69299_supplies), - ctx->supplies); -} - static int visionox_rm69299_disable(struct drm_panel *panel) { struct visionox_rm69299 *ctx = panel_to_ctx(panel); struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; ctx->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; mipi_dsi_dcs_set_display_off_multi(&dsi_ctx); @@ -205,17 +197,20 @@ static int visionox_rm69299_disable(struct drm_panel *panel) return dsi_ctx.accum_err; } static int visionox_rm69299_unprepare(struct drm_panel *panel) { struct visionox_rm69299 *ctx = panel_to_ctx(panel); - return visionox_rm69299_power_off(ctx); + gpiod_set_value(ctx->reset_gpio, 0); + + return regulator_bulk_disable(ARRAY_SIZE(visionox_rm69299_supplies), + ctx->supplies); } static int visionox_rm69299_prepare(struct drm_panel *panel) { struct visionox_rm69299 *ctx = panel_to_ctx(panel); struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; int ret, i; -- 2.55.0
