[PATCH 01/12] led: pwm: always initialize PWM LEDs as inactive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



While the active-low property is respected when setting brightness,
it's ignored when initializing the LED as off in the probe function
and thus LEDs are active on startup. Fix this.

Fixes: 769eb5e7bb ("led: pwm: support active-low property")
Signed-off-by: Ahmad Fatoum <ahmad@xxxxxx>
---
 drivers/led/led-pwm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/led/led-pwm.c b/drivers/led/led-pwm.c
index 8a358dde88b3..4935572ec2d2 100644
--- a/drivers/led/led-pwm.c
+++ b/drivers/led/led-pwm.c
@@ -73,7 +73,7 @@ static int led_pwm_of_probe(struct device_d *dev)
 
 		pwmled->led.set = led_pwm_set;
 
-		pwm_config(pwmled->pwm, 0, pwmled->period);
+		led_pwm_set(&pwmled->led, 0);
 		pwm_enable(pwmled->pwm);
 
 		ret = led_register(&pwmled->led);
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux