mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
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>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user