diff options
author | Bill Richardson <wfrichar@chromium.org> | 2012-06-22 14:15:26 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-06-22 15:56:57 -0700 |
commit | 80c635ecabdd398c20441cfd4dadb00c7eb76720 (patch) | |
tree | 604ec5789631b4f4514449c858d017f23e72fe73 /include | |
parent | e61af38f55525177393a1e915fca45ef1c983411 (diff) | |
download | chrome-ec-80c635ecabdd398c20441cfd4dadb00c7eb76720.tar.gz |
Add 'fanduty' command both EC console and ectool.
This forces the fan PWM duty cycle to a fixed percentage (0-100). It's only
used for airflow testing.
BUG=chrome-os-partner:10747
TEST=manual
Using this ectool, try
ectool fanduty 0
ectool pwmgetfanrpm
ectool fanduty 50
ectool pwmgetfanrpm
ectool fanduty 100
ectool pwmgetfanrpm
You should see (and hear) the fan speed up. If you have an EC console, you
can run
faninfo
and it should show that the 'Target:' is unrelated to the 'Actual:' value.
Change-Id: Iac332fb3ba63f96726cf7f64061b3ce22d2e76fd
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/25965
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/ec_commands.h | 6 | ||||
-rw-r--r-- | include/pwm.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index 02ad07eb20..3c8b8cb11c 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -381,6 +381,12 @@ struct ec_params_pwm_set_keyboard_backlight { uint8_t percent; } __attribute__ ((packed)); +/* Set target fan PWM duty cycle */ +#define EC_CMD_PWM_SET_FAN_DUTY 0x24 +struct ec_params_pwm_set_fan_duty { + uint32_t percent; +} __attribute__ ((packed)); + /*****************************************************************************/ /* Lightbar commands. This looks worse than it is. Since we only use one LPC * command to say "talk to the lightbar", we put the "and tell it to do X" diff --git a/include/pwm.h b/include/pwm.h index 356b080532..0d21769233 100644 --- a/include/pwm.h +++ b/include/pwm.h @@ -23,6 +23,9 @@ int pwm_get_fan_target_rpm(void); /* Set the target fan RPM. Pass -1 to set fan to maximum. */ int pwm_set_fan_target_rpm(int rpm); +/* Set the fan PWM duty cycle (0-100), disabling the automatic control. */ +int pwm_set_fan_duty(int percent); + /* Enable/disable the keyboard backlight. */ int pwm_enable_keyboard_backlight(int enable); |