Commit 554c0018 authored by Douglas Anderson's avatar Douglas Anderson Committed by Neil Armstrong

drm/panel: ilitek-ili9882t: If prepare fails, disable GPIO before regulators

The enable GPIO should clearly be set low before turning off
regulators. That matches both the inverse order that things were
enabled and also the order in unprepare().

Fixes: e2450d32 ("drm/panel: ili9882t: Break out as separate driver")
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240517143643.4.Ieb0179065847972a0f13e9a8574a80a5f65f3338@changeidSigned-off-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517143643.4.Ieb0179065847972a0f13e9a8574a80a5f65f3338@changeid
parent 6320b919
...@@ -495,13 +495,13 @@ static int ili9882t_prepare(struct drm_panel *panel) ...@@ -495,13 +495,13 @@ static int ili9882t_prepare(struct drm_panel *panel)
return 0; return 0;
poweroff: poweroff:
gpiod_set_value(ili->enable_gpio, 0);
regulator_disable(ili->avee); regulator_disable(ili->avee);
poweroffavdd: poweroffavdd:
regulator_disable(ili->avdd); regulator_disable(ili->avdd);
poweroff1v8: poweroff1v8:
usleep_range(5000, 7000); usleep_range(5000, 7000);
regulator_disable(ili->pp1800); regulator_disable(ili->pp1800);
gpiod_set_value(ili->enable_gpio, 0);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment