thermal: power allocator: refactor sustainable power estimation
authorLukasz Luba <lukasz.luba@arm.com>
Tue, 24 Nov 2020 16:10:24 +0000 (16:10 +0000)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 26 Nov 2020 16:11:59 +0000 (17:11 +0100)
commiteda1ecfa772f11b68b0ddb8d1c3948451fcff5d6
tree4f4e822b72ecdeaec31ff0a30f398a3c3c19c903
parente34a7233896928e4e39d3cdb201ce605d5b258c2
thermal: power allocator: refactor sustainable power estimation

The sustainable power value might come from the Device Tree or can be
estimated in run time. The sustainable power might be updated by the user
via sysfs interface, which should trigger new estimation of PID
coefficients. There is no need to estimate it every time when the
governor is called and temperature is high. Instead, store the estimated
value and make it available via standard sysfs interface, so it can be
checked from the user-space.

Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Reviewed-by: Ionela Voinescu <ionela.voinescu@arm.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201124161025.27694-3-lukasz.luba@arm.com
drivers/thermal/gov_power_allocator.c