diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/fan.c | 4 | ||||
-rw-r--r-- | common/thermal.c | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/common/fan.c b/common/fan.c index 18ea31acdb..5e2f85475f 100644 --- a/common/fan.c +++ b/common/fan.c @@ -510,7 +510,11 @@ static void pwm_fan_resume(void) { int fan; for (fan = 0; fan < CONFIG_FANS; fan++) { +#ifdef CONFIG_FAN_RPM_CUSTOM + set_thermal_control_enabled(fan, 1); +#else set_thermal_control_enabled(fan, 0); +#endif fan_set_rpm_target(fans[fan].ch, fans[fan].rpm_max); set_enabled(fan, 1); } diff --git a/common/thermal.c b/common/thermal.c index bd9ed7fbf0..7d7438f3e5 100644 --- a/common/thermal.c +++ b/common/thermal.c @@ -80,12 +80,17 @@ static void thermal_control(void) /* check all the limits */ for (j = 0; j < EC_TEMP_THRESH_COUNT; j++) { int limit = thermal_params[i].temp_host[j]; + int release = thermal_params[i].temp_host_release[j]; if (limit) { num_valid_limits[j]++; - if (t > limit) + if (t > limit) { count_over[j]++; - else if (t < limit) + } else if (release) { + if (t < release) + count_under[j]++; + } else if (t < limit) { count_under[j]++; + } } } @@ -130,7 +135,6 @@ static void thermal_control(void) cond_set_false(&cond_hot[j]); } - /* What do we do about it? (note hard-coded logic). */ if (cond_went_true(&cond_hot[EC_TEMP_THRESH_HALT])) { |