From 84d89a5dc307e198ec2f170797b69938867803fe Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Thu, 21 Jun 2012 18:27:33 -0700 Subject: [PATCH] Reenable EC console 'fanduty' command, for testing. BUG=chrome-os-partner:10747 TEST=manual Boot the CPU (the fan is off otherwise). From the EC console run faninfo It should show the fan duty cycle changing to maintain a specific RPM. Run fanduty 50 faninfo Now the fan duty cycle should be fixed around 50%. Change-Id: I13e4b0a7e5b2661769d64bf93342483d0419545d Signed-off-by: Bill Richardson Reviewed-on: https://gerrit.chromium.org/gerrit/25900 Reviewed-by: Randall Spangler --- board/link/board.h | 3 +++ chip/lm4/pwm.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/board/link/board.h b/board/link/board.h index 6124bf921e..08f6b405d9 100644 --- a/board/link/board.h +++ b/board/link/board.h @@ -28,6 +28,9 @@ /* Enable the fake developer switch. See crosbug.com/p/8884 */ #define CONFIG_FAKE_DEV_SWITCH +/* Enable direct fan PWM control. See crosbug.com/p/10747 */ +#define CONFIG_CONSOLE_CMD_FANDUTY + /* Fan PWM channels */ #define FAN_CH_CPU 0 /* CPU fan */ #define FAN_CH_KBLIGHT 1 /* Keyboard backlight */ diff --git a/chip/lm4/pwm.c b/chip/lm4/pwm.c index cf4f776f22..78c7bccdbc 100644 --- a/chip/lm4/pwm.c +++ b/chip/lm4/pwm.c @@ -213,7 +213,7 @@ DECLARE_CONSOLE_COMMAND(fanset, command_fan_set, NULL); -#ifdef CONSOLE_COMMAND_FANDUTY +#ifdef CONFIG_CONSOLE_CMD_FANDUTY /* TODO: this is a temporary command for debugging tach issues */ static int command_fan_duty(int argc, char **argv) {