mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
soc: rockchip: opp_select: adjust memory voltage by otp
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> Change-Id: Icfed6bd8766329b10ddb6d5d78e5306a013389cb
This commit is contained in:
@@ -1484,9 +1484,14 @@ static void rockchip_adjust_opp_by_otp(struct device *dev,
|
||||
if (opp->rate > opp_info.max_freq * 1000000)
|
||||
continue;
|
||||
|
||||
opp->supplies->u_volt += opp_info.volt * 1000;
|
||||
if (opp->supplies->u_volt > opp->supplies->u_volt_max)
|
||||
opp->supplies->u_volt = opp->supplies->u_volt_max;
|
||||
opp->supplies[0].u_volt += opp_info.volt * 1000;
|
||||
if (opp->supplies[0].u_volt > opp->supplies[0].u_volt_max)
|
||||
opp->supplies[0].u_volt = opp->supplies[0].u_volt_max;
|
||||
if (opp_table->regulator_count > 1) {
|
||||
opp->supplies[1].u_volt += opp_info.volt * 1000;
|
||||
if (opp->supplies[1].u_volt > opp->supplies[1].u_volt_max)
|
||||
opp->supplies[1].u_volt = opp->supplies[1].u_volt_max;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&opp_table->lock);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user