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

Commit 40fdaf31 authored by Sarthak Garg's avatar Sarthak Garg
Browse files

mmc: sdhci-msm: Disable always-on LDO's when eMMC is absent



Both eMMC and UFS share the regulators (vdd & vdd-io).
On UFS based devices this regulator can be turned off after the eMMC
probe fails.

Override vdd-io-always-on flag as false.

Change-Id: I2e2abb14512d5e3f8fc0cb67d1aa734c78674cfa
Signed-off-by: default avatarSarthak Garg <sartgarg@codeaurora.org>
parent 4c39afb3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1978,6 +1978,7 @@ static int sdhci_msm_setup_vreg(struct sdhci_msm_host *msm_host,
	int ret = 0, i;
	struct sdhci_msm_vreg_data *curr_slot;
	struct sdhci_msm_reg_data *vreg_table[2];
	struct mmc_host *mmc = msm_host->mmc;

	curr_slot = msm_host->vreg_data;
	if (!curr_slot) {
@@ -1989,6 +1990,10 @@ static int sdhci_msm_setup_vreg(struct sdhci_msm_host *msm_host,
	vreg_table[0] = curr_slot->vdd_data;
	vreg_table[1] = curr_slot->vdd_io_data;

	/* When eMMC absent disable regulator marked as always_on */
	if (!enable && vreg_table[1]->is_always_on && !mmc->card)
		vreg_table[1]->is_always_on = false;

	for (i = 0; i < ARRAY_SIZE(vreg_table); i++) {
		if (vreg_table[i]) {
			if (enable)