Re: [PATCH v2 2/2] pwm: loongson: Reload PWM configuration through counter reset

From: Keguang Zhang

Date: Thu Jul 09 2026 - 03:32:48 EST


On Mon, Jul 6, 2026 at 4:03 PM Uwe Kleine-König <ukleinek@xxxxxxxxxx> wrote:
>
> On Fri, Jun 26, 2026 at 08:24:23PM +0800, Keguang Zhang via B4 Relay wrote:
> > From: Keguang Zhang <keguang.zhang@xxxxxxxxx>
> >
> > The Loongson PWM controller latches the LOW and PERIOD registers only at
> > the start of each PWM period. After disabling and re-enabling the PWM,
> > the controller resumes from the previous counter value and completes the
> > current period before re-latching the updated LOW and PERIOD values.
> >
> > Reset the PWM counter when disabling the PWM and release it when
> > enabling the PWM so that the updated LOW and PERIOD values are latched
> > before the PWM starts running again.
> >
> > Signed-off-by: Keguang Zhang <keguang.zhang@xxxxxxxxx>
>
> This also needs a Fixes: line, referencing 2b62c89448dd ("pwm: Add
> Loongson PWM controller support"), too, right?

Will do. Thanks!

>
> Best regards
> Uwe



--
Best regards,

Keguang Zhang