The struct devfreq_cooling_power is defined only if the devfreq
driver's kernel config flag is defined. Drivers using the devfreq
cooling device APIs without having the devfreq kconfig flag enabled will
have compilation errors because the struct devfreq_cooling_power will
not be defined.
To avoid this, define the struct devfreq_cooling_power and make it
available even when devfreq kernel config flag is not enabled.
Change-Id: I39973c0bbd3f760dc9ce557e8f7308df7b564fad
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Be consistent with what other cooling devices do and return a struct
thermal_cooling_device * on register. Also, for the unregister, accept
a struct thermal_cooling_device * as parameter.
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Add a generic thermal cooling device for devfreq, that is similar to
cpu_cooling.
The device must use devfreq. In order to use the power extension of the
cooling device, it must have registered its OPPs using the OPP library.
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Ørjan Eide <orjan.eide@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>