linux/drivers/video/backlight
Geert Uytterhoeven 892c7788c7 backlight: pwm_bl: Fix GPIO out for unimplemented .get_direction()
Commit 7613c92231 ("backlight: pwm_bl: Move the checks for initial
power state to a separate function") not just moved some code, but made
slight changes in semantics.

If a gpiochip doesn't implement the optional .get_direction() callback,
gpiod_get_direction always returns -EINVAL, which is never equal to
GPIOF_DIR_IN, leading to the GPIO not being configured for output.

To avoid this, invert the test and check for not GPIOF_DIR_OUT instead,
like the original code did.

This restores the display on r8a7740/armadillo.

Fixes: 7613c92231 ("backlight: pwm_bl: Move the checks for initial power state to a separate function")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2017-04-19 19:59:44 +01:00
..
88pm860x_bl.c
aat2870_bl.c
adp5520_bl.c backlight: adp5520: Fix error handling in adp5520_bl_probe() 2017-01-04 11:37:31 +00:00
adp8860_bl.c backlight: adp8860: Fix another uninitialized variable use 2016-01-11 07:58:43 +00:00
adp8870_bl.c backlight: adp88x0: Fix uninitialized variable use 2016-01-11 05:56:12 +00:00
ams369fg06.c
apple_bl.c
as3711_bl.c
backlight.c video / backlight: remove the backlight_device_registered API 2016-05-04 23:41:14 +02:00
bd6107.c
corgi_lcd.c
cr_bllcd.c
da903x_bl.c
da9052_bl.c backlight: da9052: Fix module autoload 2017-01-04 11:37:58 +00:00
ep93xx_bl.c
generic_bl.c
gpio_backlight.c backlight: gpio-backlight: Use default-on on GPIO request 2016-01-11 07:58:35 +00:00
hp680_bl.c
hx8357.c
ili922x.c
ili9320.c
ili9320.h
ipaq_micro_bl.c
jornada720_bl.c
jornada720_lcd.c
kb3886_bl.c
Kconfig
l4f00242t03.c
lcd.c backlight: lcd: Fix race condition during register 2017-01-04 11:37:31 +00:00
ld9040_gamma.h
ld9040.c
lm3533_bl.c
lm3630a_bl.c backlight: lm3630a: explicitly apply PWM config extracted from pwm_args 2016-05-17 14:45:05 +02:00
lm3639_bl.c
lms283gf05.c
lms501kf03.c
locomolcd.c
lp855x_bl.c backlight: lp855x: Add enable regulator 2016-06-29 10:06:21 +01:00
lp8788_bl.c backlight: lp8788: Explicitly apply PWM config extracted from pwm_args 2016-05-17 14:45:04 +02:00
ltv350qv.c
ltv350qv.h
lv5207lp.c
Makefile
max8925_bl.c
omap1_bl.c
ot200_bl.c
pandora_bl.c
pcf50633-backlight.c
platform_lcd.c
pm8941-wled.c backlight: pm8941-wled: Add default-brightness property 2015-10-30 18:47:51 +00:00
pwm_bl.c backlight: pwm_bl: Fix GPIO out for unimplemented .get_direction() 2017-04-19 19:59:44 +01:00
s6e63m0_gamma.h
s6e63m0.c
sky81452-backlight.c
tdo24m.c
tosa_bl.c backlight-tosa: Delete unnecessary assignment for the field "owner" 2016-10-06 09:27:25 +01:00
tosa_lcd.c
tps65217_bl.c backlight: tps65217_bl: Add MODULE_DEVICE_TABLE 2016-01-11 06:36:35 +00:00
vgg2432a4.c
wm831x_bl.c