summaryrefslogtreecommitdiff
path: root/board/bds
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-08-05 11:17:35 +0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-08-27 23:20:33 +0000
commit5d014fd2dd5e92ad35a4f2dd1b58e0b1baebb65e (patch)
tree2078f9831177392f22ba202cbea4b09d69a9a710 /board/bds
parent99f06c39aabd262653c96c589c5cd26fc1fb8389 (diff)
downloadchrome-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/bds')
-rw-r--r--board/bds/board.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/board/bds/board.h b/board/bds/board.h
index b35cf0445b..f2e7c3d75b 100644
--- a/board/bds/board.h
+++ b/board/bds/board.h
@@ -40,6 +40,10 @@ enum adc_channel {
ADC_CH_COUNT
};
+enum pwm_channel {
+ PWM_CH_COUNT
+};
+
/* I2C ports */
#define I2C_PORT_LIGHTBAR 5 // port 5 / PA6:7 on link, but PG6:7 on badger
/* Number of I2C ports used */