Commit 804c4d0a authored by Douglas Anderson's avatar Douglas Anderson Committed by Neil Armstrong

drm/panel: sharp-ls043t1le01: Stop tracking prepared

As talked about in commit d2aacaf0 ("drm/panel: Check for already
prepared/enabled in drm_panel"), we want to remove needless code from
panel drivers that was storing and double-checking the
prepared/enabled state. Even if someone was relying on the
double-check before, that double-check is now in the core and not
needed in individual drivers.

Cc: Werner Johansson <werner.johansson@sonymobile.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarMaxime Ripard <mripard@kernel.org>
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Reviewed-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240604172305.v3.19.I56849dbe7c906f0cff076dc5286fd05c7e3e9c18@changeidSigned-off-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.19.I56849dbe7c906f0cff076dc5286fd05c7e3e9c18@changeid
parent d7d473d8
...@@ -26,8 +26,6 @@ struct sharp_nt_panel { ...@@ -26,8 +26,6 @@ struct sharp_nt_panel {
struct regulator *supply; struct regulator *supply;
struct gpio_desc *reset_gpio; struct gpio_desc *reset_gpio;
bool prepared;
}; };
static inline struct sharp_nt_panel *to_sharp_nt_panel(struct drm_panel *panel) static inline struct sharp_nt_panel *to_sharp_nt_panel(struct drm_panel *panel)
...@@ -99,9 +97,6 @@ static int sharp_nt_panel_unprepare(struct drm_panel *panel) ...@@ -99,9 +97,6 @@ static int sharp_nt_panel_unprepare(struct drm_panel *panel)
struct sharp_nt_panel *sharp_nt = to_sharp_nt_panel(panel); struct sharp_nt_panel *sharp_nt = to_sharp_nt_panel(panel);
int ret; int ret;
if (!sharp_nt->prepared)
return 0;
ret = sharp_nt_panel_off(sharp_nt); ret = sharp_nt_panel_off(sharp_nt);
if (ret < 0) { if (ret < 0) {
dev_err(panel->dev, "failed to set panel off: %d\n", ret); dev_err(panel->dev, "failed to set panel off: %d\n", ret);
...@@ -112,8 +107,6 @@ static int sharp_nt_panel_unprepare(struct drm_panel *panel) ...@@ -112,8 +107,6 @@ static int sharp_nt_panel_unprepare(struct drm_panel *panel)
if (sharp_nt->reset_gpio) if (sharp_nt->reset_gpio)
gpiod_set_value(sharp_nt->reset_gpio, 0); gpiod_set_value(sharp_nt->reset_gpio, 0);
sharp_nt->prepared = false;
return 0; return 0;
} }
...@@ -122,9 +115,6 @@ static int sharp_nt_panel_prepare(struct drm_panel *panel) ...@@ -122,9 +115,6 @@ static int sharp_nt_panel_prepare(struct drm_panel *panel)
struct sharp_nt_panel *sharp_nt = to_sharp_nt_panel(panel); struct sharp_nt_panel *sharp_nt = to_sharp_nt_panel(panel);
int ret; int ret;
if (sharp_nt->prepared)
return 0;
ret = regulator_enable(sharp_nt->supply); ret = regulator_enable(sharp_nt->supply);
if (ret < 0) if (ret < 0)
return ret; return ret;
...@@ -152,8 +142,6 @@ static int sharp_nt_panel_prepare(struct drm_panel *panel) ...@@ -152,8 +142,6 @@ static int sharp_nt_panel_prepare(struct drm_panel *panel)
goto poweroff; goto poweroff;
} }
sharp_nt->prepared = true;
return 0; return 0;
poweroff: poweroff:
......
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