Heiko Stuebner e4c8ae3e3d backlight: pwm_bl: Re-add driver internal enabled tracking
Commit e6bcca0890b9 ("backlight: pwm_bl: Switch to using "atomic" PWM API")
removed the driver internal enabled tracking in favor of simply checking
the pwm state.

This can lead to issues as all of gpio-, regulator- and pwm-state are used
to determine the initial state and the bootloader or kernel can leave them
in an inconsistent state at boot.

In my case on rk3399-kevin, the pwm backlight is build as module and the
kernel disables the supply regulator as unused while keeping the pwm running
thus pwm_bl calling pwm_backlight_power_off() during probe and creating an
unmatched regulator-disable call, as it never got enabled from the pwm-bl
before.

To prevent these consistency issues, reintroduce the driver-internal
tracking of the enabled state.

Fixes: e6bcca0890b9 ("backlight: pwm_bl: Switch to using "atomic" PWM API")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>

Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-11-27 12:10:51 +00:00
..
2018-11-02 11:22:45 -07:00
2018-11-01 18:34:46 -07:00
2018-11-02 11:25:48 -07:00
2018-10-29 15:16:01 -07:00
2018-10-27 09:24:24 -07:00
2018-10-25 06:50:48 -07:00
2018-10-16 11:13:50 +02:00
2018-10-25 06:50:48 -07:00
2018-11-01 08:42:21 -07:00
2018-10-11 12:12:55 +02:00
2018-10-29 10:38:10 -07:00
2018-10-31 08:54:16 -07:00
2018-11-02 11:25:48 -07:00
2018-10-31 10:53:29 -07:00
2018-10-31 16:47:55 -07:00
2018-10-25 06:31:56 -07:00
2018-11-02 11:25:48 -07:00
2018-11-01 14:45:38 -07:00
2018-10-26 14:36:21 -07:00
2018-10-22 17:30:06 +01:00
2018-10-26 08:14:13 -07:00
2018-11-01 08:42:21 -07:00
2018-10-26 12:09:58 -07:00
2018-10-29 15:16:01 -07:00
2018-10-31 08:54:16 -07:00
2018-11-03 10:47:33 -07:00
2018-10-31 08:54:16 -07:00
2018-10-25 06:19:15 -07:00
2018-10-31 10:53:29 -07:00
2018-11-03 10:34:03 -07:00
2018-10-11 09:16:44 -07:00
2018-10-31 08:54:16 -07:00
2018-10-31 11:01:38 -07:00
2018-11-01 14:42:49 -07:00