diff options
author | Vic Yang <victoryang@chromium.org> | 2013-08-05 11:17:35 +0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-08-27 23:20:33 +0000 |
commit | 5d014fd2dd5e92ad35a4f2dd1b58e0b1baebb65e (patch) | |
tree | 2078f9831177392f22ba202cbea4b09d69a9a710 /board/host/board.h | |
parent | 99f06c39aabd262653c96c589c5cd26fc1fb8389 (diff) | |
download | chrome-ec-5d014fd2dd5e92ad35a4f2dd1b58e0b1baebb65e.tar.gz |
Refactor PWM module
This unifies the PWM module interface for LM4 and STM32. Now PWM
channels are defined in board.h/board.c. Instead of calling functions
named pwm_set_fan_duty(x), one can now use pwm_set_duty(PWM_CH_FAN, x),
which prevents additional functions added when we have a new PWM
channel.
BUG=chrome-os-partner:18343
TEST=Limit input current on Spring.
TEST=Check power LED in S0/S3/S5 on Snow.
TEST=Check keyboard backlight functionality on Link.
TEST=Check fan speed control/detecting on Link.
BRANCH=None
Change-Id: Ibac4d79f72e65c94776d503558a7592f7db859dc
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/64450
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'board/host/board.h')
-rw-r--r-- | board/host/board.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/board/host/board.h b/board/host/board.h index 1af8db0c5d..9301d24e00 100644 --- a/board/host/board.h +++ b/board/host/board.h @@ -14,6 +14,7 @@ #define CONFIG_KEYBOARD_PROTOCOL_MKBP #define CONFIG_POWER_BUTTON #undef CONFIG_WATCHDOG +#define CONFIG_PWM #undef CONFIG_CONSOLE_HISTORY #define CONFIG_CONSOLE_HISTORY 4 @@ -53,4 +54,10 @@ enum adc_channel { ADC_CH_COUNT }; +enum pwm_channel { + PWM_CH_FAN, + + PWM_CH_COUNT +}; + #endif /* __BOARD_H */ |