]> git.baikalelectronics.ru Git - kernel.git/commit
backlight: pwm_bl: Fix devicetree parsing with auto-generated brightness tables
authorHeiko Stuebner <heiko.stuebner@bq.com>
Mon, 12 Nov 2018 09:02:57 +0000 (10:02 +0100)
committerLee Jones <lee.jones@linaro.org>
Tue, 27 Nov 2018 12:16:41 +0000 (12:16 +0000)
commit917afb78114bd11e61b6b8ae3becad2a28f26a2e
treef7d1b89ae3ccd952c09ce3be25a08c47f49c799b
parentc94c65a996c3b688dbca8bf68e214df5a97aa63d
backlight: pwm_bl: Fix devicetree parsing with auto-generated brightness tables

Commit 049f161f37bc ("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: 049f161f37bc ("backlight: pwm_bl: Compute brightness of LED linearly to human eye")
Signed-off-by: Heiko Stuebner <heiko.stuebner@bq.com>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/video/backlight/pwm_bl.c