mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
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>
This commit is contained in:
parent
5aa50a28af
commit
487c53d3b9
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user