drm/panel: novatek-nt36672e: stop setting register load before disable
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 4 Apr 2024 10:08:01 +0000 (13:08 +0300)
committerNeil Armstrong <neil.armstrong@linaro.org>
Wed, 24 Apr 2024 06:55:22 +0000 (08:55 +0200)
It is pointless to set register load before disabling the register. This
vote is going to be dropped as soon as the register is disabled. Drop
these register_set_load calls.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240404-drop-panel-unregister-v1-3-9f56953c5fb9@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240404-drop-panel-unregister-v1-3-9f56953c5fb9@linaro.org
drivers/gpu/drm/panel/panel-novatek-nt36672e.c

index c39fe0fc5d69c646915561bc3d4cb5cfc5411ac1..9a870b9b67654aa2d8862c04792e85a68dac5768 100644 (file)
@@ -25,12 +25,6 @@ static const unsigned long regulator_enable_loads[] = {
        100000,
 };
 
-static const unsigned long regulator_disable_loads[] = {
-       80,
-       100,
-       100,
-};
-
 struct panel_desc {
        const struct drm_display_mode *display_mode;
        u32 width_mm;
@@ -385,20 +379,9 @@ static int nt36672e_power_off(struct nt36672e_panel *ctx)
 {
        struct mipi_dsi_device *dsi = ctx->dsi;
        int ret = 0;
-       int i;
 
        gpiod_set_value(ctx->reset_gpio, 0);
 
-       for (i = 0; i < ARRAY_SIZE(ctx->supplies); i++) {
-               ret = regulator_set_load(ctx->supplies[i].consumer,
-                               regulator_disable_loads[i]);
-               if (ret) {
-                       dev_err(&dsi->dev, "regulator set load failed for supply %s: %d\n",
-                               ctx->supplies[i].supply, ret);
-                       return ret;
-               }
-       }
-
        ret = regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
        if (ret)
                dev_err(&dsi->dev, "regulator bulk disable failed: %d\n", ret);