Skip to content
Commit e4c8ae3e authored by Heiko Stuebner's avatar Heiko Stuebner Committed by Lee Jones
Browse files

backlight: pwm_bl: Re-add driver internal enabled tracking



Commit e6bcca08 ("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: e6bcca08 ("backlight: pwm_bl: Switch to using "atomic" PWM API")
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Acked-by: default avatarThierry Reding <thierry.reding@gmail.com>
Acked-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>

Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 65102238
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment