Skip to contentSkip to conversation

rockchip: Set up default PWM flags

PATCH In review Simon Glass 2 participants 3 messages May 24, 2017 – Oct 6, 2017 PWM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rockchip: Set up default PWM flags

At present if the PWM set_invert() method is not called then the flags are not set up and the driver does not work properly. Fix this by setting up the default flags when probing.

Fixes 874ee59 (rockchip: pwm: implement pwm_set_invert())

---

 drivers/pwm/rk_pwm.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pwm/rk_pwm.c +1 -0
index f3b2f7615d..5d78d4a67d 100644
@@ -92,6 +92,7 @@ static int rk_pwm_probe(struct udevice *dev)
 		return -EINVAL;
 	}
 	priv->freq = clk_get_rate(&clk);
+	priv->enable_conf = PWM_DUTY_POSTIVE | PWM_INACTIVE_POSTIVE;
 
 	return 0;
 }
Signature · 1 line
2.13.0.219.gdb65acc882-goog
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines

At present if the PWM set_invert() method is not called then the flags are not set up and the driver does not work properly. Fix this by setting up the default flags when probing.

Fixes 874ee59 (rockchip: pwm: implement pwm_set_invert())

---

 drivers/pwm/rk_pwm.c | 1 +
 1 file changed, 1 insertion(+)
Reviewed-by on v1 1/1
#2 lore raw
In reply to Simon Glass
Quoted 11 lines

At present if the PWM set_invert() method is not called then the flags are not set up and the driver does not work properly. Fix this by setting up the default flags when probing.

Fixes 874ee59 (rockchip: pwm: implement pwm_set_invert())

---

 drivers/pwm/rk_pwm.c | 1 +
 1 file changed, 1 insertion(+)