thermal: let governors have private data for each thermal zone
authorJavi Merino <javi.merino@arm.com>
Thu, 26 Feb 2015 19:00:27 +0000 (19:00 +0000)
committerEduardo Valentin <edubezval@gmail.com>
Tue, 5 May 2015 04:27:52 +0000 (21:27 -0700)
commite33df1d2f3a0141cd79e770f31999ba0dd7ebfa8
tree8a0602ce3137212c292dec7603c66120665255c8
parentc610afaa21d3c6e7b02040c8563ffc01c7fc0570
thermal: let governors have private data for each thermal zone

A governor may need to store its current state between calls to
throttle().  That state depends on the thermal zone, so store it as
private data in struct thermal_zone_device.

The governors may have two new ops: bind_to_tz() and unbind_from_tz().
When provided, these functions let governors do some initialization
and teardown when they are bound/unbound to a tz and possibly store that
information in the governor_data field of the struct
thermal_zone_device.

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>
drivers/thermal/thermal_core.c
include/linux/thermal.h