summaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorRam Chandrasekar <rkumbako@codeaurora.org>2016-07-21 10:20:07 -0600
committerRam Chandrasekar <rkumbako@codeaurora.org>2016-07-21 10:20:07 -0600
commitf70b8219bbb1bf14c08120b00d1411b9583e9b4f (patch)
tree87c8685546a8f1061b0d1c8b08a0a19e4b8e401f /drivers/thermal
parentaa958278d16faccd0cc79650b94ea6aa18d4131d (diff)
msm: thermal: Update the hotplug initialization
Hotplug initialization will trigger a hotplug if temperature stays above the trip threshold and will try to online if temperature is below the clear threshold. Since KTM does boot mitigation till thermal-engine is running, hotplug init can be called twice. First from post init script and second when the hotplug task is initialized. There is a possiblity the first init call can set the hotplug local mask and the second init call wont clear or update the mask with correct value if the temperature is between the hotplug trip and clear threshold. Update the hotplug init API to perform the check only if the hotplug task is initialized. Also the hotplug check will clear the hotplug local mask if the temperature is not above the trip threshold. Change-Id: Ica1325f8aa65c338ea0e5b201f566607c3ddf904 Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/msm_thermal.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/thermal/msm_thermal.c b/drivers/thermal/msm_thermal.c
index bbc6a8e96d41..ff40d6fad922 100644
--- a/drivers/thermal/msm_thermal.c
+++ b/drivers/thermal/msm_thermal.c
@@ -3615,7 +3615,7 @@ static int hotplug_init_cpu_offlined(void)
int temp = 0;
uint32_t cpu = 0;
- if (!hotplug_enabled)
+ if (!hotplug_enabled || !hotplug_task)
return 0;
mutex_lock(&core_control_mutex);
@@ -3632,8 +3632,7 @@ static int hotplug_init_cpu_offlined(void)
if (temp >= msm_thermal_info.hotplug_temp_degC)
cpus[cpu].offline = 1;
- else if (temp <= (msm_thermal_info.hotplug_temp_degC -
- msm_thermal_info.hotplug_temp_hysteresis_degC))
+ else
cpus[cpu].offline = 0;
}
mutex_unlock(&core_control_mutex);