diff options
author | Philip Rakity <prakity@marvell.com> | 2012-07-23 20:25:18 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-09-04 13:58:13 -0400 |
commit | 77dcb3f4c344d4c9619803848f1aba4d271dac7b (patch) | |
tree | f65cd13ee8f89702dabe7c05189bb35eccbb686c /drivers/mmc | |
parent | 6231f3de1332b2a8a90e0c598ab6acc8f1eff7c1 (diff) |
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: Philip Rakity <prakity@marvell.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 828ac6c2990c..d98b1992d778 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -2908,7 +2908,8 @@ int sdhci_add_host(struct sdhci_host *host) | |||
2908 | if (IS_ERR(host->vmmc)) { | 2908 | if (IS_ERR(host->vmmc)) { |
2909 | pr_info("%s: no vmmc regulator found\n", mmc_hostname(mmc)); | 2909 | pr_info("%s: no vmmc regulator found\n", mmc_hostname(mmc)); |
2910 | host->vmmc = NULL; | 2910 | host->vmmc = NULL; |
2911 | } | 2911 | } else |
2912 | regulator_enable(host->vmmc); | ||
2912 | 2913 | ||
2913 | #ifdef CONFIG_REGULATOR | 2914 | #ifdef CONFIG_REGULATOR |
2914 | if (host->vmmc) { | 2915 | if (host->vmmc) { |
@@ -3165,8 +3166,10 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) | |||
3165 | tasklet_kill(&host->card_tasklet); | 3166 | tasklet_kill(&host->card_tasklet); |
3166 | tasklet_kill(&host->finish_tasklet); | 3167 | tasklet_kill(&host->finish_tasklet); |
3167 | 3168 | ||
3168 | if (host->vmmc) | 3169 | if (host->vmmc) { |
3170 | regulator_disable(host->vmmc); | ||
3169 | regulator_put(host->vmmc); | 3171 | regulator_put(host->vmmc); |
3172 | } | ||
3170 | 3173 | ||
3171 | if (host->vqmmc) { | 3174 | if (host->vqmmc) { |
3172 | regulator_disable(host->vqmmc); | 3175 | regulator_disable(host->vqmmc); |