diff options
author | Zhou weixin <zwx@rock-chips.com> | 2016-08-17 10:18:30 +0800 |
---|---|---|
committer | Huang, Tao <huangtao@rock-chips.com> | 2016-08-24 13:12:36 +0800 |
commit | 487c53d3b909cbee287e153bc19885637235f495 (patch) | |
tree | a97aa44f68fe90465ea7d7c0672a5bca105d3d55 /drivers/pwm | |
parent | 5aa50a28afa86cf7559fb47fee21130433af35a9 (diff) |
pwm: rockchip: Make pwm polarity to be configured correctly
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>
Diffstat (limited to 'drivers/pwm')
-rw-r--r-- | drivers/pwm/pwm-rockchip.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c index f11e1fc9f97b..beab624fb9d9 100644 --- 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; |