[U-Boot] [PATCH v4 1/4] power: regulator: pwm: support pwm polarity setting

sjg at google.com sjg at google.com
Tue May 2 11:12:47 UTC 2017


The latest kernel PWM drivers enable the polarity settings. When system
run from U-Boot to kerenl, if there are differences in polarity set or
duty cycle, the PMW will re-init:
  close -> set polarity and duty cycle -> enable the PWM.
The power supply controled by pwm regulator may have voltage shaking,
which lead to the system not stable.

Signed-off-by: Elaine Zhang <zhangqing at rock-chips.com>
Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
Acked-by: Simon Glass <sjg at chromium.org>
---

Changes in v4:
- Split patch into uclass and rockchip patch

Changes in v3:
- use bool type for polarity

Changes in v2:
- use pwm_set_invert() instead of pwm_set_init()
- add comment for polarity

 drivers/power/regulator/pwm_regulator.c | 16 ++++++++++++++--
 drivers/pwm/pwm-uclass.c                | 10 ++++++++++
 include/pwm.h                           | 19 +++++++++++++++++++
 3 files changed, 43 insertions(+), 2 deletions(-)

Applied to u-boot-rockchip/next, thanks!


More information about the U-Boot mailing list