]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/pwm/rk_pwm.c
i2c: ihs_i2c: Factor out send_buffer method
[people/ms/u-boot.git] / drivers / pwm / rk_pwm.c
index 28de62d71611087ace2f188c85f4a57ec60f42f4..2364c2dfddc9ad9473ed5196a5dde120a432ded4 100644 (file)
@@ -29,6 +29,7 @@ static int rk_pwm_set_invert(struct udevice *dev, uint channel, bool polarity)
        struct rk_pwm_priv *priv = dev_get_priv(dev);
 
        debug("%s: polarity=%u\n", __func__, polarity);
+       priv->enable_conf &= ~(PWM_DUTY_MASK | PWM_INACTIVE_MASK);
        if (polarity)
                priv->enable_conf |= PWM_DUTY_NEGATIVE | PWM_INACTIVE_POSTIVE;
        else