Merge "scsi: ufs: set load before setting voltage in regulators"
This commit is contained in:
commit
c803ca5bd8
1 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue