Skip to content
Commit 61170ee9 authored by Heiko Stuebner's avatar Heiko Stuebner Committed by Lee Jones
Browse files

backlight: pwm_bl: Fix devicetree parsing with auto-generated brightness tables



Commit 88ba95be ("backlight: pwm_bl: Compute brightness of LED linearly
to human eye") made the parse-dt function return early when using an auto-
generated brightness-table, but didn't take into account that some more
settings were handled below the brightness handling, like power-on-delays
and also setting the pdata enable-gpio to -EINVAL.

This surfaces for example in the case of a backlight without any
enable-gpio which then tries to use gpio-0 in error.

Fix this by simply moving the trailing settings above the brightness
handling.

Fixes: 88ba95be ("backlight: pwm_bl: Compute brightness of LED linearly to human eye")
Signed-off-by: default avatarHeiko Stuebner <heiko.stuebner@bq.com>
Acked-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent e4c8ae3e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment