summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMulin Chao <mlchao@nuvoton.com>2017-03-22 17:42:34 +0800
committerchrome-bot <chrome-bot@chromium.org>2017-03-24 06:49:55 -0700
commite43ba03ebf3c921f2abfd4e9153725e87f28da62 (patch)
treee25bf9ac0b742400e88b83ea95b673fa40ccedeb /include
parent61f61b368eeacc3c4d4627bdfa8d81e9b6538675 (diff)
downloadchrome-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 'include')
-rw-r--r--include/pwm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/pwm.h b/include/pwm.h
index ee731a597e..24b89332fc 100644
--- a/include/pwm.h
+++ b/include/pwm.h
@@ -71,4 +71,8 @@ int pwm_get_duty(enum pwm_channel ch);
* PWM channel must stay active in low-power idle, if enabled.
*/
#define PWM_CONFIG_DSLEEP (1 << 4)
+/**
+ * PWM channel's IO type is open-drain, if enabled. (default IO is push-pull.)
+ */
+#define PWM_CONFIG_OPEN_DRAIN (1 << 5)
#endif /* __CROS_EC_PWM_H */