Merge "scsi: ufs: set load before setting voltage in regulators"

This commit is contained in:
Linux Build Service Account 2018-11-13 06:23:22 -08:00 committed by Gerrit - the friendly Code Review server
commit c803ca5bd8

View file

@ -7997,6 +7997,11 @@ static int ufshcd_config_vreg(struct device *dev,
name = vreg->name; name = vreg->name;
if (regulator_count_voltages(reg) > 0) { 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; min_uV = on ? vreg->min_uV : 0;
ret = regulator_set_voltage(reg, min_uV, vreg->max_uV); ret = regulator_set_voltage(reg, min_uV, vreg->max_uV);
if (ret) { if (ret) {
@ -8004,11 +8009,6 @@ static int ufshcd_config_vreg(struct device *dev,
__func__, name, ret); __func__, name, ret);
goto out; goto out;
} }
uA_load = on ? vreg->max_uA : 0;
ret = ufshcd_config_vreg_load(dev, vreg, uA_load);
if (ret)
goto out;
} }
out: out:
return ret; return ret;