Skip to content
Commit 229794ee authored by Lukasz Luba's avatar Lukasz Luba Committed by Daniel Lezcano
Browse files

thermal: devfreq_cooling: use a copy of device status



Devfreq cooling needs to now the correct status of the device in order
to operate. Devfreq framework can change the device status in the
background. To mitigate issues make a copy of the status structure and use
it for internal calculations.

In addition this patch adds normalization function, which also makes sure
that whatever data comes from the device, the load will be in range from 1
to 1024.

Reviewed-by: default avatarIonela Voinescu <ionela.voinescu@arm.com>
Signed-off-by: default avatarLukasz Luba <lukasz.luba@arm.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201210143014.24685-3-lukasz.luba@arm.com
parent b8643a52
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment