Skip to content

Commit

Permalink
mmc: omap_hsmmc: ensure pbias configuration is always done
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adrian Hunter authored and Chris Ball committed Oct 26, 2011
1 parent bec8726 commit e840ce1
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions drivers/mmc/host/omap_hsmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit e840ce1

Please sign in to comment.