]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Thermal: Introduce .get_trend() callback.
authorZhang Rui <rui.zhang@intel.com>
Wed, 27 Jun 2012 01:54:33 +0000 (09:54 +0800)
committerZhang Rui <rui.zhang@intel.com>
Thu, 9 Aug 2012 01:02:53 +0000 (09:02 +0800)
commit46643bb73af051a29628ff390dce051594fdcb01
tree497f09fcf665c066e4efc5d9542b33f021632ea9
parent0829c8f7cce0822b3b5ab18090a4e0f478888506
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.

Reviewed-by: Valentin, Eduardo <eduardo.valentin@ti.com>
Reviewed-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/acpi/thermal.c
drivers/thermal/thermal_sys.c
include/linux/thermal.h