diff options
author | Mulin Chao <mlchao@nuvoton.com> | 2017-03-22 17:42:34 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-03-24 06:49:55 -0700 |
commit | e43ba03ebf3c921f2abfd4e9153725e87f28da62 (patch) | |
tree | e25bf9ac0b742400e88b83ea95b673fa40ccedeb /board/npcx_evb/board.c | |
parent | 61f61b368eeacc3c4d4627bdfa8d81e9b6538675 (diff) | |
download | chrome-ec-e43ba03ebf3c921f2abfd4e9153725e87f28da62.tar.gz |
npcx: Move pwm open-drain functionality from gpio to pwm driver.
Setting PWM IO type in gpio driver seems not a proper way. This
CL moves this functionality to pwm driver and introduces a new
flag PWM_CONFIG_OPEN_DRAIN to achieve it when user declared it
in board driver.
BRANCH=none
BUG=none
TEST=test pwm functionality on npcx_evb.
Change-Id: I90c60445d1fb10902244ddf0f635d8304e72f4ab
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Reviewed-on: https://chromium-review.googlesource.com/458043
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/npcx_evb/board.c')
-rw-r--r-- | board/npcx_evb/board.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/board/npcx_evb/board.c b/board/npcx_evb/board.c index 8a3d1b8c5d..baaf040e15 100644 --- a/board/npcx_evb/board.c +++ b/board/npcx_evb/board.c @@ -45,7 +45,7 @@ BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); /******************************************************************************/ /* PWM channels. Must be in the exactly same order as in enum pwm_channel. */ const struct pwm_t pwm_channels[] = { - [PWM_CH_FAN] = { 0, PWM_CONFIG_DSLEEP, 100}, + [PWM_CH_FAN] = { 0, PWM_CONFIG_DSLEEP | PWM_CONFIG_OPEN_DRAIN, 100}, [PWM_CH_KBLIGHT] = { 1, 0, 10000 }, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); |