[PATCH 1/2] backlight: lp855x: Initialize PWM state on first brightness change
Daniel Thompson
daniel.thompson at linaro.org
Mon Jul 17 08:38:25 UTC 2023
On Fri, Jul 14, 2023 at 02:14:39PM +0200, Artur Weber wrote:
> As pointed out by Uwe Kleine-König[1], the changes introduced in
> commit c1ff7da03e16 ("video: backlight: lp855x: Get PWM for PWM mode
> during probe") caused the PWM state set up by the bootloader to be
> re-set when the driver is probed. This differs from the behavior from
> before that patch, where the PWM state would be initialized on the
> first brightness change.
>
> Fix this by moving the PWM state initialization into the PWM control
> function. Add a new variable, needs_pwm_init, to the device info struct
> to allow us to check whether we need the initialization, or whether it
> has already been done.
>
> [1] https://lore.kernel.org/lkml/20230614083953.e4kkweddjz7wztby@pengutronix.de/
>
> Fixes: c1ff7da03e16 ("video: backlight: lp855x: Get PWM for PWM mode during probe")
> Signed-off-by: Artur Weber <aweber.kernel at gmail.com>
Reviewed-by: Daniel Thompson <daniel.thompson at linaro.org>
More information about the dri-devel
mailing list