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

Keguang Zhang <[email protected]> Thu, 9 Jul 2026 15:29:25 +0800
Newsgroups org.kernel.vger.linux-pwm,org.kernel.vger.linux-kernel
Message-ID <CAJhJPsUGcFz5YmTHBj8mN83bVuOdpJ0mtDHR_haVkgsrDQQGxw@mail.gmail.com>
On Mon, Jul 6, 2026 at 4:03 PM Uwe Kleine-König <[email protected]> wrote:
>
> On Fri, Jun 26, 2026 at 08:24:23PM +0800, Keguang Zhang via B4 Relay wrote:
> > From: Keguang Zhang <[email protected]>
> >
> > 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 <[email protected]>
>
> 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