PM / OPP: Update voltage even if target rate is equal to initial rate

The regulator is shared between several devices on some platforms,
if cpu target rate is equal to initial rate, the min_uV and max_uV
of cpu regulator will be always equal to zero, other devices may
set a low voltage which can't meet cpu initial rate.

Change-Id: I97e4815a2422417cd9bd605c93138f5ffda9cc86
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This commit is contained in:
Finley Xiao
2018-05-04 15:03:14 +08:00
committed by Tao Huang
parent 016724119e
commit dc1acdf19f

View File

@@ -771,10 +771,7 @@ int dev_pm_opp_check_initial_rate(struct device *dev, unsigned long *cur_freq)
dev_dbg(dev, "%lu Hz %d uV --> %lu Hz %lu uV\n", old_freq, old_volt,
target_freq, u_volt);
if (old_freq == target_freq && old_volt == u_volt)
return 0;
if (old_freq == target_freq && old_volt != u_volt) {
if (old_freq == target_freq) {
ret = _set_opp_voltage(dev, reg, u_volt, u_volt_min,
u_volt_max);
if (ret) {