summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRong Dian <b38775@freescale.com>2012-08-23 15:34:00 +0800
committerTerry Lv <r65388@freescale.com>2012-08-27 16:51:21 +0800
commitfab781fe20adfcd3d805a1a051835ec6fe6b077a (patch)
tree9a20d14cb5a94cca9d75aba3e46ea2143781e9a3
parent073566a6648b978d1a1e392a98dc85bab34272ac (diff)
ENGR00221197-1 imx6 thermal: clear thermal hot variable in cooling device
clear thermal hot variable in cooling device when thermal temperature falls then to get out of THERMAL_TRIP_HOT state Signed-off-by: Rong Dian <b38775@freescale.com>
-rw-r--r--drivers/mxc/thermal/cooling.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mxc/thermal/cooling.c b/drivers/mxc/thermal/cooling.c
index 772f771c8149..31188f01ffab 100644
--- a/drivers/mxc/thermal/cooling.c
+++ b/drivers/mxc/thermal/cooling.c
@@ -57,6 +57,7 @@ cpufreq, it minor 1, and when we promote cpufreq, it add 1, so
if it is 0, mean we didn't change the cpufreq */
static int cpufreq_change_count;
+extern int thermal_hot;
int anatop_thermal_get_cpufreq_cur(void)
{
int ret = -EINVAL;
@@ -235,6 +236,7 @@ imx_processor_set_cur_state(struct thermal_cooling_device *cdev,
secondary CPUs that detached by thermal driver */
if (cooling_cpuhotplug) {
if (!state) {
+ thermal_hot = 0;
for (i = 1; i < 4; i++) {
if (cpu_mask && (0x1 << i)) {
anatop_thermal_cpu_hotplug(true);
@@ -245,6 +247,7 @@ imx_processor_set_cur_state(struct thermal_cooling_device *cdev,
}
} else {
if (!state) {
+ thermal_hot = 0;
if (cpufreq_change_count < 0)
anatop_thermal_cpufreq_up();
else if (cpufreq_change_count > 0)