Commit Message

The pwm backlight should be powered off only in two cases:
1) pwm polarity is normal and brightness is zero.
2) pwm polarity is inversed and brightness is maximal,
that is, 100% duty.
This patch implements this logic in the pwm backlight driver
and actually fixes the issue that backlight is on when we
intend to set the brightness to be zero for an inversed pwm
signal. The root cause of the issue is that power is off
in that case.
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
---
drivers/video/backlight/pwm_bl.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)