powercap/drivers/dtpm: Add dtpm devfreq with energy model support
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Fri, 28 Jan 2022 16:35:36 +0000 (17:35 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Fri, 4 Feb 2022 16:38:09 +0000 (17:38 +0100)
commite446556173170e675a7a321e76ce5fa3587de724
treee6159ed5fcb52d5f30135ba51a62301c9e032f17
parent73dbcb6e37bf0c43bac8c15fe5bcab2bec2367fb
powercap/drivers/dtpm: Add dtpm devfreq with energy model support

Currently the dtpm supports the CPUs via cpufreq and the energy
model. This change provides the same for the device which supports
devfreq.

Each device supporting devfreq and having an energy model can be added
to the hierarchy.

The concept is the same as the cpufreq DTPM support: the QoS is used
to aggregate the requests and the energy model gives the value of the
instantaneous power consumption ponderated by the load of the device.

Cc: Chanwoo Choi <cwchoi00@gmail.com>
Cc: Lukasz Luba <lukasz.luba@arm.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20220128163537.212248-5-daniel.lezcano@linaro.org
drivers/powercap/Kconfig
drivers/powercap/Makefile
drivers/powercap/dtpm_devfreq.c [new file with mode: 0644]
drivers/powercap/dtpm_subsys.h