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 /chip/lm4/lpc.c | |
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 'chip/lm4/lpc.c')
-rw-r--r-- | chip/lm4/lpc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chip/lm4/lpc.c b/chip/lm4/lpc.c index 04563caf66..71938409d8 100644 --- a/chip/lm4/lpc.c +++ b/chip/lm4/lpc.c @@ -401,7 +401,7 @@ static void handle_acpi_write(int is_cmd) * good enough and less code than defining a new * console command interface just for ACPI read/write. */ - result = pwm_get_keyboard_backlight(); + result = pwm_get_duty(PWM_CH_KBLIGHT); break; #endif default: @@ -427,7 +427,7 @@ static void handle_acpi_write(int is_cmd) * debug console. */ CPRINTF("\r[%T ACPI kblight %d]", data); - pwm_set_keyboard_backlight(data); + pwm_set_duty(PWM_CH_KBLIGHT, data); break; #endif default: |