On Fri, 20 Jan 2023, 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@xxxxxxxxxxxxxx> > --- > drivers/video/backlight/pwm_bl.c | 30 ++++++++++++++++++++++-------- > 1 file changed, 22 insertions(+), 8 deletions(-) Applied, thanks -- Lee Jones [李琼斯]