Commit 6a62b78d authored by Kevin Hilman's avatar Kevin Hilman

OMAP3+: voltage: update nominal voltage in voltdm_scale() not VC post-scale

Currently, the nominal voltage is updated in the VC post-scale function
which is common to both scaling methods.  However, this has readabiliy
problems as this update is not where it might be expected.  Instead, move
the updated into voltdm_scale() upon a successful return of voltdm->scale()
Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
parent d5c12828
...@@ -152,8 +152,6 @@ void omap_vc_post_scale(struct voltagedomain *voltdm, ...@@ -152,8 +152,6 @@ void omap_vc_post_scale(struct voltagedomain *voltdm,
smps_delay = ((smps_steps * voltdm->pmic->step_size) / smps_delay = ((smps_steps * voltdm->pmic->step_size) /
voltdm->pmic->slew_rate) + 2; voltdm->pmic->slew_rate) + 2;
udelay(smps_delay); udelay(smps_delay);
voltdm->nominal_volt = target_volt;
} }
/* vc_bypass_scale - VC bypass method of voltage scaling */ /* vc_bypass_scale - VC bypass method of voltage scaling */
......
...@@ -85,7 +85,11 @@ int voltdm_scale(struct voltagedomain *voltdm, ...@@ -85,7 +85,11 @@ int voltdm_scale(struct voltagedomain *voltdm,
return -ENODATA; return -ENODATA;
} }
return voltdm->scale(voltdm, target_volt); ret = voltdm->scale(voltdm, target_volt);
if (!ret)
voltdm->nominal_volt = target_volt;
return ret;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment