diff options
author | Douglas Anderson <dianders@chromium.org> | 2022-08-04 16:38:51 +0200 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2022-09-18 18:38:05 +0200 |
commit | 15cde7ea0778fe1f92fbb00be4564ec239d84d3c (patch) | |
tree | 517d862cc754203a3a473476254947320267d30c /drivers/gpu/drm/msm/dsi/dsi_host.c | |
parent | drm/msm/dsi: Don't set a load before disabling a regulator (diff) | |
download | linux-15cde7ea0778fe1f92fbb00be4564ec239d84d3c.tar.xz linux-15cde7ea0778fe1f92fbb00be4564ec239d84d3c.zip |
drm/msm/dsi: Use the new regulator bulk feature to specify the load
As of commit 6eabfc018e8d ("regulator: core: Allow specifying an
initial load w/ the bulk API") we can now specify the initial load in
the bulk data rather than having to manually call regulator_set_load()
on each regulator. Let's use it.
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/496319/
Link: https://lore.kernel.org/r/20220804073608.v4.4.I7b3c72949883846badb073cfeae985c55239da1d@changeid
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/dsi/dsi_host.c')
-rw-r--r-- | drivers/gpu/drm/msm/dsi/dsi_host.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 99e21d38c7da..00476c127e53 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -262,8 +262,10 @@ static int dsi_regulator_init(struct msm_dsi_host *msm_host) int num = msm_host->cfg_hnd->cfg->reg_cfg.num; int i, ret; - for (i = 0; i < num; i++) + for (i = 0; i < num; i++) { s[i].supply = regs[i].name; + s[i].init_load_uA = regs[i].enable_load; + } ret = devm_regulator_bulk_get(&msm_host->pdev->dev, num, s); if (ret < 0) { @@ -272,15 +274,6 @@ static int dsi_regulator_init(struct msm_dsi_host *msm_host) return ret; } - for (i = 0; i < num; i++) { - if (regs[i].enable_load >= 0) { - ret = regulator_set_load(s[i].consumer, - regs[i].enable_load); - if (ret < 0) - return ret; - } - } - return 0; } |