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. However I can't see why it would be a problem (since both remain in the same place relative to the sleeps) so: Reviewed-by: Daniel Thompson <daniel.thompson@xxxxxxxxxx> Daniel.