disp: msm: set voltage to min before disable

This change sets the regulator voltage to zero for all
those regulators which support voltage scaling before
disabling the regulator. Failing to do so causes the regulator
vote to set to the last min value specified in the previous
set voltage call.
Additionally modified the config regulator api and renamed to
get regulator because of the above change.

Change-Id: Ie4c4842db0c08a4d98926ed79503cf84e4d5762a
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
This commit is contained in:
Abhijit Kulkarni
2020-04-23 23:03:27 -07:00
rodzic 34df751b29
commit 96e8b6819c
5 zmienionych plików z 32 dodań i 55 usunięć

Wyświetl plik

@@ -574,10 +574,10 @@ int sde_power_resource_init(struct platform_device *pdev,
goto parse_vreg_err;
}
rc = msm_dss_config_vreg(&pdev->dev,
rc = msm_dss_get_vreg(&pdev->dev,
mp->vreg_config, mp->num_vreg, 1);
if (rc) {
pr_err("vreg config failed rc=%d\n", rc);
pr_err("get config failed rc=%d\n", rc);
goto vreg_err;
}
@@ -613,7 +613,7 @@ bus_err:
clkset_err:
msm_dss_put_clk(mp->clk_config, mp->num_clk);
clkget_err:
msm_dss_config_vreg(&pdev->dev, mp->vreg_config, mp->num_vreg, 0);
msm_dss_get_vreg(&pdev->dev, mp->vreg_config, mp->num_vreg, 0);
vreg_err:
if (mp->vreg_config)
devm_kfree(&pdev->dev, mp->vreg_config);
@@ -653,7 +653,7 @@ void sde_power_resource_deinit(struct platform_device *pdev,
msm_dss_put_clk(mp->clk_config, mp->num_clk);
msm_dss_config_vreg(&pdev->dev, mp->vreg_config, mp->num_vreg, 0);
msm_dss_get_vreg(&pdev->dev, mp->vreg_config, mp->num_vreg, 0);
if (mp->clk_config)
devm_kfree(&pdev->dev, mp->clk_config);