Commit Graph

3 Commits

Author SHA1 Message Date
Ram Chandrasekar
5f7c0080f4 drivers: devfreq: Define devfreq_cooling_power outside of defconfig
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>
2017-03-30 17:22:00 -06:00
Javi Merino
3c99c2cef7 thermal: devfreq_cooling: use a thermal_cooling_device for register and unregister
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>
2015-11-02 13:14:44 -08:00
Ørjan Eide
a76caf55e5 thermal: Add devfreq cooling
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>
2015-10-30 10:21:01 -07:00