Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e840ce13 authored by Adrian Hunter's avatar Adrian Hunter Committed by Chris Ball
Browse files

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: default avatarAdrian Hunter <adrian.hunter@nokia.com>
Acked-by: default avatarBalaji T K <balajitk@ti.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent bec8726a
Loading
Loading
Loading
Loading
+8 −9
Original line number Original line Diff line number Diff line
@@ -450,15 +450,14 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
		* framework is fixed, we need a workaround like this
		* framework is fixed, we need a workaround like this
		* (which is safe for MMC, but not in general).
		* (which is safe for MMC, but not in general).
		*/
		*/
		if (regulator_is_enabled(host->vcc) > 0) {
		if (regulator_is_enabled(host->vcc) > 0 ||
			regulator_enable(host->vcc);
		    (host->vcc_aux && regulator_is_enabled(host->vcc_aux))) {
			regulator_disable(host->vcc);
			int vdd = ffs(mmc_slot(host).ocr_mask) - 1;
		}

		if (host->vcc_aux) {
			mmc_slot(host).set_power(host->dev, host->slot_id,
			if (regulator_is_enabled(reg) > 0) {
						 1, vdd);
				regulator_enable(reg);
			mmc_slot(host).set_power(host->dev, host->slot_id,
				regulator_disable(reg);
						 0, 0);
			}
		}
		}
	}
	}