mirror of
https://github.com/u-boot/u-boot.git
synced 2025-01-21 10:14:05 +08:00
video: backlight: fix pwm inversion
set_pwm() will always fail with -ENOSYS if pwm_ops set_invert() is
not implemented, leaving the backlight dark. Fix this by returning
no error if set_invert() is not implemented and no polarity change
is requested.
Fixes: 57e7775413
("video: backlight: Parse PWM polarity cell")
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
This commit is contained in:
parent
1f83431f00
commit
a2c4ef0977
@ -67,6 +67,9 @@ static int set_pwm(struct pwm_backlight_priv *priv)
|
||||
return log_ret(ret);
|
||||
|
||||
ret = pwm_set_invert(priv->pwm, priv->channel, priv->polarity);
|
||||
if (ret == -ENOSYS && !priv->polarity)
|
||||
ret = 0;
|
||||
|
||||
return log_ret(ret);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user