summaryrefslogtreecommitdiff
path: root/common/thermal.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-10-11 15:10:26 -0700
committerGerrit <chrome-bot@google.com>2012-10-15 13:41:28 -0700
commite764bdbb03780d1e4c879edd046923c5c2d409a5 (patch)
treef93c6693025130ebf62235a43cbf5acbd46aa3e2 /common/thermal.c
parent9a0e69cbbf9c20ea5915d5cce56dd6ec9226d945 (diff)
downloadchrome-ec-e764bdbb03780d1e4c879edd046923c5c2d409a5.tar.gz
link:re-enable fan RPM controller when needed
Previously, any command which set the fan duty manually would leave the PWM RPM controller disabled. Setting the fan back to auto mode via 'ectool autofanctrl' or 'autofan' or 'ectool pwmsetfanrpm' wouldn't turn the controller back on. Now it does. BUG=chrome-os-partner:14307 BRANCH=link TEST=manual - Reboot in recovery mode and wait for INSERT screen - From EC console fanduty 100 -> fan turns on all the way faninfo -> mode is duty fanset 6000 -> fan turns down to a lower level faninfo -> mode is rpm fanduty 0 -> fan turns off all the way faninfo -> mode is duty (wait a min or so for the system to heat up) autofan -> fan turns on faninfo -> mode is rpm - Reboot normally - From root shell ectool fanduty 100 -> fan turns on all the way ectool pwmsetfanrpm 6000 -> fan turns down to a lower level Change-Id: I3b07e8b49500f5f8a42f20909d2869cf63987d6d Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/35335 Reviewed-by: Sameer Nanda <snanda@chromium.org>
Diffstat (limited to 'common/thermal.c')
-rw-r--r--common/thermal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/thermal.c b/common/thermal.c
index c452fff495..6aa8209848 100644
--- a/common/thermal.c
+++ b/common/thermal.c
@@ -83,6 +83,11 @@ int thermal_get_threshold(enum temp_sensor_type type, int threshold_id)
int thermal_control_fan(int enable)
{
fan_ctrl_on = enable;
+
+ /* If controlling the fan, need it in RPM-control mode */
+ if (enable)
+ pwm_set_rpm_mode(1);
+
return EC_SUCCESS;
}