Commit 77dcb3f4 authored by Philip Rakity's avatar Philip Rakity Committed by Chris Ball

mmc: sdhci: vmmc regulator should be explicitly enabled/disabled

The vmmc regulator should not rely on the platform code to enable it.
Expliciitly enable and disable the regulator inside the driver.
Signed-off-by: default avatarPhilip Rakity <prakity@marvell.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 6231f3de
...@@ -2908,7 +2908,8 @@ int sdhci_add_host(struct sdhci_host *host) ...@@ -2908,7 +2908,8 @@ int sdhci_add_host(struct sdhci_host *host)
if (IS_ERR(host->vmmc)) { if (IS_ERR(host->vmmc)) {
pr_info("%s: no vmmc regulator found\n", mmc_hostname(mmc)); pr_info("%s: no vmmc regulator found\n", mmc_hostname(mmc));
host->vmmc = NULL; host->vmmc = NULL;
} } else
regulator_enable(host->vmmc);
#ifdef CONFIG_REGULATOR #ifdef CONFIG_REGULATOR
if (host->vmmc) { if (host->vmmc) {
...@@ -3165,8 +3166,10 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) ...@@ -3165,8 +3166,10 @@ void sdhci_remove_host(struct sdhci_host *host, int dead)
tasklet_kill(&host->card_tasklet); tasklet_kill(&host->card_tasklet);
tasklet_kill(&host->finish_tasklet); tasklet_kill(&host->finish_tasklet);
if (host->vmmc) if (host->vmmc) {
regulator_disable(host->vmmc);
regulator_put(host->vmmc); regulator_put(host->vmmc);
}
if (host->vqmmc) { if (host->vqmmc) {
regulator_disable(host->vqmmc); regulator_disable(host->vqmmc);
......
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