drm/panel: st7703: Assert reset prior to powering down the regulators
authorOndrej Jirman <megous@megous.com>
Wed, 1 Jul 2020 16:29:26 +0000 (18:29 +0200)
committerSam Ravnborg <sam@ravnborg.org>
Wed, 1 Jul 2020 17:25:50 +0000 (19:25 +0200)
The reset pin is inverted, so if we don't assert reset, the actual gpio
will be high and may keep driving the IO port of the panel.

Signed-off-by: Ondrej Jirman <megous@megous.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200701162928.1638874-12-megous@megous.com
drivers/gpu/drm/panel/panel-sitronix-st7703.c

index 7750179bca607d5821663d795192bdf9e9d768a2..8996ced2b721a8313054a74819d0c137fa05e27c 100644 (file)
@@ -415,6 +415,7 @@ static int st7703_unprepare(struct drm_panel *panel)
        if (!ctx->prepared)
                return 0;
 
+       gpiod_set_value_cansleep(ctx->reset_gpio, 1);
        regulator_disable(ctx->iovcc);
        regulator_disable(ctx->vcc);
        ctx->prepared = false;