From dc1acdf19f4ad7a2aa460f6fdbdb76a1ece47d1e Mon Sep 17 00:00:00 2001 From: Finley Xiao Date: Fri, 4 May 2018 15:03:14 +0800 Subject: [PATCH] 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 --- drivers/base/power/opp/core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c index 5b76ca1e1d01..7028daa3adcb 100644 --- a/drivers/base/power/opp/core.c +++ b/drivers/base/power/opp/core.c @@ -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) {