Re: [PATCH 1/2] backlight: pwm_bl: configure pwm only once per backlight toggle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Daniel,

On Tue, Jan 10, 2023 at 04:17:16PM +0000, Daniel Thompson wrote:
> On Mon, Jan 09, 2023 at 09:47:57PM +0100, Uwe Kleine-König wrote:
> > When the function pwm_backlight_update_status() was called with
> > brightness > 0, pwm_get_state() was called twice (once directly and once
> > in compute_duty_cycle). Also pwm_apply_state() was called twice (once in
> > pwm_backlight_power_on() and once directly).
> >
> > Optimize this to do both calls only once.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> 
> This will reverse the order in which the regulator is toggled versus the
> PWM starting/stopping. It would be nice to that in the description.

Oh, that wasn't a concious choice. I agree this should be noted. The
current state is also a bit confused because the duty cycle is setup
before the regulator but the PWM only gets enabled afterwards.

Expect a v2 with an updated commit log.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Tourism]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux