summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2014-02-21 11:07:16 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-02-21 22:10:09 +0000
commit8df483bf594d6251005a88de211078e2a445a55d (patch)
treecfb354e28d5164a691d8302186fb186cbf39239f
parentd778fabaaa143580f582c184eba0ef348a22a8d2 (diff)
downloadchrome-ec-8df483bf594d6251005a88de211078e2a445a55d.tar.gz
Host command to set fan RPM enables fan
Previously, it would only set the fan RPM, but not actually enable the fan so it can spin at the requested speed. Compare with setting fan duty cycle, which always enabled the fan. BUG=chrome-os-partner:23803 BRANCH=samus TEST=with fans off, 'ectool pwmsetfanrpm 1000' should spin both fans, and the ec 'faninfo' command should show both fans enabled. Change-Id: I37d7fb05309944ab6f98333e2cf3b38ea2dd38e9 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/187386 Reviewed-by: Sameer Nanda <snanda@chromium.org>
-rw-r--r--common/fan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/fan.c b/common/fan.c
index d61eba67d9..a51450bbfd 100644
--- a/common/fan.c
+++ b/common/fan.c
@@ -313,6 +313,9 @@ static int hc_pwm_set_fan_target_rpm(struct host_cmd_handler_args *args)
/* TODO(crosbug.com/p/23803) */
for (fan = 0; fan < CONFIG_FANS; fan++) {
+ /* Always enable the fan */
+ set_enabled(fan, 1);
+
set_thermal_control_enabled(fan, 0);
fan_set_rpm_mode(fans[fan].ch, 1);
fan_set_rpm_target(fans[fan].ch, p->rpm);