Thermal: Introduce .get_trend() callback.
authorZhang Rui <rui.zhang@intel.com>
Wed, 27 Jun 2012 01:54:33 +0000 (09:54 +0800)
committerSimone Willett <swillett@nvidia.com>
Mon, 5 Nov 2012 18:09:54 +0000 (10:09 -0800)
commit594e7fef602d51b856816d53642a354371810dd6
tree7e0ab35b6dfa0b5eff77ba341fdd4fa96b3307d0
parent7cc148ee926bf271f49332b5d18f62f718a4f407
Thermal: Introduce .get_trend() callback.

According to ACPI spec, tc1 and tc2 are used by OSPM
to anticipate the temperature trends.
We introduced the same concept to the generic thermal layer
for passive cooling, but now it seems that these values
are hard to be used on other platforms.

So We introduce .get_trend() as a more general solution.

For the platform thermal drivers that have their own way to
anticipate the temperature trends, they should provide
their own .get_trend() callback.
Or else, we will calculate the temperature trends by simply
comparing the current temperature and the cached previous
temperature reading.

bug 1059470

Change-Id: I85ca51d87ae8fde8429a83399a81979a41913218
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Rafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: Valentin, Eduardo <eduardo.valentin@ti.com>
Reviewed-on: http://git-master/r/159965
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Joshua Primero <jprimero@nvidia.com>
Tested-by: Joshua Primero <jprimero@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
drivers/acpi/thermal.c
drivers/thermal/thermal_sys.c
include/linux/thermal.h