WSL2-Linux-Kernel/drivers/video/backlight
Daniel Thompson 79fad92f2e backlight: pwm_bl: Improve bootloader/kernel device handover
Currently there are (at least) two problems in the way pwm_bl starts
managing the enable_gpio pin. Both occur when the backlight is initially
off and the driver finds the pin not already in output mode and, as a
result, unconditionally switches it to output-mode and asserts the signal.

Problem 1: This could cause the backlight to flicker since, at this stage
in driver initialisation, we have no idea what the PWM and regulator are
doing (an unconfigured PWM could easily "rest" at 100% duty cycle).

Problem 2: This will cause us not to correctly honour the
post_pwm_on_delay (which also risks flickers).

Fix this by moving the code to configure the GPIO output mode until after
we have examines the handover state. That allows us to initialize
enable_gpio to off if the backlight is currently off and on if the
backlight is on.

Cc: stable@vger.kernel.org
Reported-by: Marek Vasut <marex@denx.de>
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Marek Vasut <marex@denx.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-08-19 10:59:03 +01:00
..
88pm860x_bl.c
Kconfig backlight: Kconfig whitespace and indentation cleanups 2021-06-01 13:36:24 +01:00
Makefile backlight: rt4831: Adds support for Richtek RT4831 backlight 2021-05-19 15:52:25 +01:00
aat2870_bl.c
adp5520_bl.c
adp8860_bl.c
adp8870_bl.c
ams369fg06.c
apple_bl.c
arcxcnn_bl.c
as3711_bl.c
backlight.c
bd6107.c
corgi_lcd.c
cr_bllcd.c
da903x_bl.c
da9052_bl.c
ep93xx_bl.c
gpio_backlight.c
hp680_bl.c
hx8357.c
ili922x.c
ili9320.c
ili9320.h
ipaq_micro_bl.c
jornada720_bl.c backlight: journada720: Fix Wmisleading-indentation warning 2021-03-23 09:42:55 +00:00
jornada720_lcd.c
kb3886_bl.c
ktd253-backlight.c backlight: ktd253: Stabilize backlight 2021-07-21 17:27:27 +01:00
l4f00242t03.c
lcd.c
led_bl.c
lm3533_bl.c
lm3630a_bl.c backlight: lm3630a: Convert to atomic PWM API and check for errors 2021-06-22 14:11:37 +01:00
lm3639_bl.c
lms283gf05.c backlight: lms283gf05: Convert to GPIO descriptors 2021-01-20 12:47:11 +00:00
lms501kf03.c
locomolcd.c ARM: 9049/1: locomo: make locomo bus's remove callback return void 2021-02-01 19:44:30 +00:00
lp855x_bl.c
lp8788_bl.c
ltv350qv.c
ltv350qv.h
lv5207lp.c
max8925_bl.c
omap1_bl.c
otm3225a.c
pandora_bl.c
pcf50633-backlight.c
platform_lcd.c
pwm_bl.c backlight: pwm_bl: Improve bootloader/kernel device handover 2021-08-19 10:59:03 +01:00
qcom-wled.c video: backlight: qcom-wled: Add PMI8994 compatible 2021-05-27 17:23:43 +01:00
rave-sp-backlight.c
rt4831-backlight.c backlight: rt4831: Adds support for Richtek RT4831 backlight 2021-05-19 15:52:25 +01:00
sky81452-backlight.c backlight: sky81452-backlight: Convert comma to semicolon 2021-01-20 12:54:14 +00:00
tdo24m.c
tosa_bl.c backlight: tosa_bl: Include the right header 2020-09-08 12:31:19 +01:00
tosa_bl.h
tosa_lcd.c backlight: tosa_lcd: Include the right header 2020-09-08 12:30:02 +01:00
tps65217_bl.c
vgg2432a4.c
wm831x_bl.c