diff mbox series

[v2,07/10] drivers/pwm/rk_pwm.c: Fix default polarity

Message ID 20201027132236.036333749@rtp-net.org
State Superseded
Delegated to: Kever Yang
Headers show
Series rk3399 (Pinebook pro) EDP support | expand

Commit Message

Arnaud Patard (Rtp) Oct. 27, 2020, 1:21 p.m. UTC
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 <arnaud.patard@rtp-net.org>

Comments

Alper Nebi Yasak Oct. 27, 2020, 10:34 p.m. UTC | #1
On 27/10/2020 16:21, Arnaud Patard (Rtp) wrote:
> 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 <arnaud.patard@rtp-net.org>

On a rk3399-gru-kevin, (see comment in patch 1):

Tested-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
diff mbox series

Patch

Index: u-boot/drivers/pwm/rk_pwm.c
===================================================================
--- u-boot.orig/drivers/pwm/rk_pwm.c
+++ u-boot/drivers/pwm/rk_pwm.c
@@ -146,7 +146,7 @@  static int rk_pwm_probe(struct udevice *
 	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;
 }