Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

backlight: pwm_bl: Check the PWM state for initial backlight power state

If the PWM is not enabled the backlight initially should not be enabled
either if we have booted with DT and there is a phandle pointing to the
backlight node.

The patch extends the checks to decide if we should keep the backlight off
initially.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Peter Ujfalusi and committed by
Lee Jones
d1b81294 7613c922

+4
+4
drivers/video/backlight/pwm_bl.c
··· 215 215 if (!regulator_is_enabled(pb->power_supply)) 216 216 return FB_BLANK_POWERDOWN; 217 217 218 + /* The PWM is disabled, keep it like this */ 219 + if (!pwm_is_enabled(pb->pwm)) 220 + return FB_BLANK_POWERDOWN; 221 + 218 222 return FB_BLANK_UNBLANK; 219 223 } 220 224