From: Arnaud Patard (Rtp) Date: Fri, 5 Mar 2021 10:27:51 +0000 (+0100) Subject: rockchip: pwm: Fix default polarity X-Git-Tag: v2021.10~230^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4db3926874a6a17cca1f97a4fd92e58e9182a272;p=platform%2Fkernel%2Fu-boot.git rockchip: pwm: Fix default polarity In the code, the default polarity is set to positive/positive, which is neither normal polarity or inverted polarity. It's only the hardware default. This leads to booting linux with wrong polarity setting. Update the code to use PWM_DUTY_POSTIVE | PWM_INACTIVE_NEGATIVE by default instead. Signed-off-by: Arnaud Patard Tested-by: Peter Robinson --- diff --git a/drivers/pwm/rk_pwm.c b/drivers/pwm/rk_pwm.c index 9cf0980..071eb04 100644 --- a/drivers/pwm/rk_pwm.c +++ b/drivers/pwm/rk_pwm.c @@ -147,7 +147,7 @@ static int rk_pwm_probe(struct udevice *dev) priv->data = (struct rockchip_pwm_data *)dev_get_driver_data(dev); if (priv->data->supports_polarity) - priv->conf_polarity = PWM_DUTY_POSTIVE | PWM_INACTIVE_POSTIVE; + priv->conf_polarity = PWM_DUTY_POSTIVE | PWM_INACTIVE_NEGATIVE; return 0; }