aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
450 * framework is fixed, we need a workaround like this 450 * framework is fixed, we need a workaround like this
451 * (which is safe for MMC, but not in general). 451 * (which is safe for MMC, but not in general).
452 */ 452 */
453 if (regulator_is_enabled(host->vcc) > 0) { 453 if (regulator_is_enabled(host->vcc) > 0 ||
454 regulator_enable(host->vcc); 454 (host->vcc_aux && regulator_is_enabled(host->vcc_aux))) {
455 regulator_disable(host->vcc); 455 int vdd = ffs(mmc_slot(host).ocr_mask) - 1;
456 } 456
457 if (host->vcc_aux) { 457 mmc_slot(host).set_power(host->dev, host->slot_id,
458 if (regulator_is_enabled(reg) > 0) { 458 1, vdd);
459 regulator_enable(reg); 459 mmc_slot(host).set_power(host->dev, host->slot_id,
460 regulator_disable(reg); 460 0, 0);
461 }
462 } 461 }
463 } 462 }
464 463