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

Commit 17d98bcb authored by Asutosh Das's avatar Asutosh Das
Browse files

scsi: ufs: set load before setting voltage in regulators



This sequence change is required to avoid dips in voltage
during boot-up.

Apparently, this dip is caused because in the original
sequence, the regulators are initialized in lpm mode.
And then when the load is set to high, and more current
is drawn, than is allowed in lpm, the dip is seen.

CRs-fixed: 2279027
Change-Id: Ic531a1e6788d6288071f93d5002613855c2667f5
Signed-off-by: default avatarAsutosh Das <asutoshd@codeaurora.org>
parent 704d1960
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -8611,6 +8611,11 @@ static int ufshcd_config_vreg(struct device *dev,
	name = vreg->name;

	if (regulator_count_voltages(reg) > 0) {
		uA_load = on ? vreg->max_uA : 0;
		ret = ufshcd_config_vreg_load(dev, vreg, uA_load);
		if (ret)
			goto out;

		min_uV = on ? vreg->min_uV : 0;
		ret = regulator_set_voltage(reg, min_uV, vreg->max_uV);
		if (ret) {
@@ -8618,11 +8623,6 @@ static int ufshcd_config_vreg(struct device *dev,
					__func__, name, ret);
			goto out;
		}

		uA_load = on ? vreg->max_uA : 0;
		ret = ufshcd_config_vreg_load(dev, vreg, uA_load);
		if (ret)
			goto out;
	}
out:
	return ret;