Thermal: Introduce thermal_zone_trip_update()
authorZhang Rui <rui.zhang@intel.com>
Wed, 27 Jun 2012 02:05:39 +0000 (10:05 +0800)
committerZhang Rui <rui.zhang@intel.com>
Mon, 24 Sep 2012 06:44:37 +0000 (14:44 +0800)
commit4ae46befb49d4173122e0afa995c4e93d01948a2
tree8585d4f0e2b67d51f5d945e3ab78fe610f592971
parent1b7ddb840c3908464b19d4aa4f6dc4c463302442
Thermal: Introduce thermal_zone_trip_update()

This function is used to update the cooling state of
all the cooling devices that are bound to an active trip point.

This will be used for passive cooling as well, in the future patches.
as both active and passive cooling can share the same algorithm,
which is

1. if the temperature is higher than a trip point,
   a. if the trend is THERMAL_TREND_RAISING, use higher cooling
      state for this trip point
   b. if the trend is THERMAL_TREND_DROPPING, use lower cooling
      state for this trip point

2. if the temperature is lower than a trip point, use lower
   cooling state for this trip point.

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