UPSTREAM: backlight: pwm_bl: Avoid backlight flicker when probed from DT
authorPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 18 Nov 2015 17:12:25 +0000 (18:12 +0100)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 6 Mar 2017 10:28:40 +0000 (18:28 +0800)
commitccbd3bdde82b99bd9d640155b814b1ea659dbf76
treed77d5d3fd33a7f9a08beabda3cc1c38c7085b180
parent5818f819cca318bdb13dc8a0f427100d2c12f077
UPSTREAM: backlight: pwm_bl: Avoid backlight flicker when probed from DT

If the driver is probed from the device tree, and there is a phandle
property set on it, and the enable GPIO is already configured as output,
and the backlight is currently disabled, keep it disabled.
If all these conditions are met, assume there will be some other driver
that can enable the backlight at the appropriate time.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit 3698d7e7d221a5c90d4b55e96d0c8f98a8b4d7df)

Change-Id: I76012aae7f546b0189c879283988d7c098f23410
Signed-off-by: David Wu <david.wu@rock-chips.com>
drivers/video/backlight/pwm_bl.c