summaryrefslogtreecommitdiff
path: root/drivers/thermal/step_wise.c
AgeCommit message (Collapse)Author
2013-04-14Thermal: build thermal governors into thermal_sys moduleZhang Rui
The thermal governors are part of the thermal framework, rather than a seperate feature/module. Because the generic thermal layer can not work without thermal governors, and it must load the thermal governors during its initialization. Build them into one module in this patch. This also fix a problem that the generic thermal layer does not work when CONFIG_THERMAL=m and CONFIG_THERMAL_GOV_XXX=y. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Durgadoss R <durgadoss.r@intel.com>
2013-04-11thermal: step_wise: set throttle target within thermal instance limitsAndrew Bresticker
When selecting a target cooling state in get_target_state(), make sure that the state is at least as high as the minimum when the temperature is rising and at least as low as the maximum when the temperature is falling. This is necessary because, in the THREAML_TREND_RAISING and THERMAL_TREND_DROPPING cases, the current state may only be incremented or decremented by one even if it is outside the bounds of the thermal instance. This might occur, for example, if the CPU is heating up and hits a thermal trip point for the first time when it's frequency is much higher than the range specified by the thermal instance corresponding to the trip point. Signed-off-by: Andrew Bresticker <abrestic@chromium.org> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-01-04step_wise: Unify the code for both throttle and dethrottleZhang Rui
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-01-04Introduce THERMAL_TREND_RAISE/DROP_FULL support for step_wise governorZhang Rui
step_wise governor should set the device cooling state to upper/lower limit directly when THERMAL_TREND_RAISE/DROP_FULL. Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-12-12Thermal: Fix DEFAULT_THERMAL_GOVERNORZhang Rui
Fix DEFAULT_THERMAL_GOVERNOR to be consistant with the default governor selected in kernel config file. Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05thermal: step_wise: Add missing static storage class specifiersSachin Kamat
Fixes the following sparse warnings: drivers/thermal/step_wise.c:153:5: warning: symbol 'step_wise_throttle' was not declared. Should it be static? drivers/thermal/step_wise.c:172:25: warning: symbol 'thermal_gov_step_wise' was not declared. Should it be static? Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-05Thermal: Introduce a step_wise thermal governorDurgadoss R
This patch adds a simple step_wise governor to the generic thermal layer. This algorithm throttles the cooling devices in a linear fashion. If the 'trend' is heating, it throttles by one step. And if the thermal trend is cooling it de-throttles by one step. This actually moves the throttling logic from thermal_sys.c and puts inside step_wise.c, without any change. Signed-off-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>