diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2020-03-30 16:57:06 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-03-31 09:48:34 +0200 |
commit | 260327c81527f71fc8f7760accb791e199564593 (patch) | |
tree | d3ef9ab67f6d88659e60758dfc68f5a9c2aea63b /drivers/led/led-pwm.c | |
parent | 6c42b62fceb042b4bc1c046c086962de4ce92c94 (diff) | |
download | barebox-260327c81527f71fc8f7760accb791e199564593.tar.gz barebox-260327c81527f71fc8f7760accb791e199564593.tar.xz |
led: pwm: always initialize PWM LEDs as inactive
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@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/led/led-pwm.c')
-rw-r--r-- | drivers/led/led-pwm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/led/led-pwm.c b/drivers/led/led-pwm.c index 8a358dde88..4935572ec2 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); |