Skip to content

Commit

Permalink
mmc: sdhci: vmmc regulator should be explicitly enabled/disabled
Browse files Browse the repository at this point in the history
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: Philip Rakity <prakity@marvell.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
  • Loading branch information
Philip Rakity authored and Chris Ball committed Sep 4, 2012
1 parent 6231f3d commit 77dcb3f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/mmc/host/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2908,7 +2908,8 @@ int sdhci_add_host(struct sdhci_host *host)
if (IS_ERR(host->vmmc)) {
pr_info("%s: no vmmc regulator found\n", mmc_hostname(mmc));
host->vmmc = NULL;
}
} else
regulator_enable(host->vmmc);

#ifdef CONFIG_REGULATOR
if (host->vmmc) {
Expand Down Expand Up @@ -3165,8 +3166,10 @@ void sdhci_remove_host(struct sdhci_host *host, int dead)
tasklet_kill(&host->card_tasklet);
tasklet_kill(&host->finish_tasklet);

if (host->vmmc)
if (host->vmmc) {
regulator_disable(host->vmmc);
regulator_put(host->vmmc);
}

if (host->vqmmc) {
regulator_disable(host->vqmmc);
Expand Down

0 comments on commit 77dcb3f

Please sign in to comment.