projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5aa50a2
)
pwm: rockchip: Make pwm polarity to be configured correctly
author
Zhou weixin
<zwx@rock-chips.com>
Wed, 17 Aug 2016 02:18:30 +0000
(10:18 +0800)
committer
Huang, Tao
<huangtao@rock-chips.com>
Wed, 24 Aug 2016 05:12:36 +0000
(13:12 +0800)
If pwm polarity was configured with different values at uboot,
the enable_conf would not be configured correctly.
Change-Id: I55b9ccc262382951a8a82810f1be74ce9460f266
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
drivers/pwm/pwm-rockchip.c
patch
|
blob
|
history
diff --git
a/drivers/pwm/pwm-rockchip.c
b/drivers/pwm/pwm-rockchip.c
index f11e1fc9f97bc41c7c9096d971fa0bdd3dd300d8..beab624fb9d98c3ecf1dd38bceab88aa86b662ef 100644
(file)
--- a/
drivers/pwm/pwm-rockchip.c
+++ b/
drivers/pwm/pwm-rockchip.c
@@
-89,6
+89,7
@@
static void rockchip_pwm_set_enable_v2(struct pwm_chip *chip,
enable_conf |= PWM_DUTY_POSITIVE | PWM_INACTIVE_NEGATIVE;
val = readl_relaxed(pc->base + pc->data->regs.ctrl);
+ val &= ~(GENMASK(5, 0) | BIT(8));
if (enable)
val |= enable_conf;