提交 4ab17ed1 编写于 作者: M Michael Kao 提交者: Daniel Lezcano

thermal: core: Add upper and lower limits to power_actor_set_power

The upper and lower limits of thermal throttle state in the
DT do not apply to the Intelligent Power Allocation (IPA) governor.
Add the clamping for cooling device upper and lower limits in the
power_actor_set_power() used by IPA.
Signed-off-by: NMichael Kao <michael.kao@mediatek.com>
Reviewed-by: NLukasz Luba <lukasz.luba@arm.com>
Tested-by: NLukasz Luba <lukasz.luba@arm.com>
Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201007024332.30322-1-michael.kao@mediatek.com
上级 3650b228
......@@ -672,7 +672,7 @@ int power_actor_set_power(struct thermal_cooling_device *cdev,
if (ret)
return ret;
instance->target = state;
instance->target = clamp_val(state, instance->lower, instance->upper);
mutex_lock(&cdev->lock);
cdev->updated = false;
mutex_unlock(&cdev->lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册