summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/omap_hsmmc.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@nokia.com>2011-05-06 13:14:10 +0400
committerChris Ball <cjb@laptop.org>2011-10-27 00:32:24 +0400
commite840ce134ba5c617af97a2adbedefb0a9c0bb5a7 (patch)
tree251479cc588670df4e01e0ac45fba44a2dad0a04 /drivers/mmc/host/omap_hsmmc.c
parentbec8726abc72bf30d2743a722aa37cd69e7a0580 (diff)
downloadlinux-e840ce134ba5c617af97a2adbedefb0a9c0bb5a7.tar.xz
mmc: omap_hsmmc: ensure pbias configuration is always done
Go through the driver's set_power() functions rather than calling regulator_enable/disable() directly because otherwise pbias configuration for MMC1 is not done. Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Acked-by: Balaji T K <balajitk@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/omap_hsmmc.c')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 3c900f34c13f..bb334be562d7 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -450,15 +450,14 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
* framework is fixed, we need a workaround like this
* (which is safe for MMC, but not in general).
*/
- if (regulator_is_enabled(host->vcc) > 0) {
- regulator_enable(host->vcc);
- regulator_disable(host->vcc);
- }
- if (host->vcc_aux) {
- if (regulator_is_enabled(reg) > 0) {
- regulator_enable(reg);
- regulator_disable(reg);
- }
+ if (regulator_is_enabled(host->vcc) > 0 ||
+ (host->vcc_aux && regulator_is_enabled(host->vcc_aux))) {
+ int vdd = ffs(mmc_slot(host).ocr_mask) - 1;
+
+ mmc_slot(host).set_power(host->dev, host->slot_id,
+ 1, vdd);
+ mmc_slot(host).set_power(host->dev, host->slot_id,
+ 0, 0);
}
}