[PATCH v2 2/2] backlight: pwm_bl: Don't rely on a disabled PWM emiting inactive state
Daniel Thompson
daniel.thompson at linaro.org
Fri Jan 20 15:04:38 UTC 2023
On Fri, Jan 20, 2023 at 01:00:18PM +0100, Uwe Kleine-König wrote:
> Most but not all PWMs drive the PWM pin to its inactive state when
> disabled. However if there is no enable_gpio and no regulator the PWM
> must drive the inactive state to actually disable the backlight.
>
> So keep the PWM on in this case.
>
> Note that to determine if there is a regulator some effort is required
> because it might happen that there isn't actually one but the regulator
> core gave us a dummy. (A nice side effect is that this makes the
> regulator actually optional even on fully constrained systems.)
>
> This fixes backlight disabling e.g. on i.MX6 when an inverted PWM is
> used.
>
> Hint for the future: If this change results in a regression, the bug is
> in the lowlevel PWM driver.
:-)
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
Thanks for the changes. Looks good:
Reviewed-by: Daniel Thompson <daniel.thompson at linaro.org>
Daniel.
More information about the dri-devel
mailing list