Skip to content
Commit 2be83da8 authored by Lukasz Luba's avatar Lukasz Luba Committed by Zhang Rui
Browse files

thermal: devfreq_cooling: add new interface for direct power read



This patch introduces a new interface for device drivers connected to
devfreq_cooling in the thermal framework: get_real_power().

Some devices have more sophisticated methods (like power counters)
to approximate the actual power that they use.
In the previous implementation we had a pre-calculated power
table which was then scaled by 'utilization'
('busy_time' and 'total_time' taken from devfreq 'last_status').

With this new interface the driver can provide more precise data
regarding actual power to the thermal governor every time the power
budget is calculated. We then use this value and calculate the real
resource utilization scaling factor.

Reviewed-by: default avatarChris Diamand <chris.diamand@arm.com>
Acked-by: default avatarJavi Merino <javi.merino@kernel.org>
Signed-off-by: default avatarLukasz Luba <lukasz.luba@arm.com>
parent e34cab4c
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