]> Git Repo - u-boot.git/commitdiff
rockchip: pwm: Fix default polarity
authorArnaud Patard (Rtp) <[email protected]>
Fri, 5 Mar 2021 10:27:51 +0000 (11:27 +0100)
committerAnatolij Gustschin <[email protected]>
Sat, 10 Apr 2021 09:54:59 +0000 (11:54 +0200)
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 <[email protected]>
Tested-by: Peter Robinson <[email protected]>
drivers/pwm/rk_pwm.c

index 9cf0980345710cce465f4e7b499c14a140df1539..071eb04fda7e27b4d2a998d1c3784882cf2bcc1f 100644 (file)
@@ -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;
 }
This page took 0.034115 seconds and 4 git commands to generate.