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>
This commit is contained in:
Randall Spangler
2014-02-21 11:07:16 -08:00
committed by chrome-internal-fetch
parent d778fabaaa
commit 8df483bf59

View File

@@ -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);