Re: [PATCH v3] pwm: imx-tpm: count the number of enabled channels in probe

From: Uwe Kleine-König

Date: Wed Mar 11 2026 - 11:58:42 EST


On Wed, Mar 11, 2026 at 11:35:10AM -0400, Frank Li wrote:
> On Wed, Mar 11, 2026 at 02:33:09PM +0200, Viorel Suman (OSS) wrote:
> > On a soft reset TPM PWM IP may preserve its internal state from
> > previous runtime, therefore on a subsequent OS boot and driver
> > probe "enable_count" value and TPM PWM IP internal channels
> > "enabled" states may get unaligned. In consequence on a suspend/resume
> > cycle the call "if (--tpm->enable_count == 0)" may lead to
> > "enable_count" overflow the system being blocked from entering
> > suspend due to:
> >
> > if (tpm->enable_count > 0)
> > return -EBUSY;
> >
> > Fix the problem by counting the enabled channels in probe function.
>
> Fix tag here

No need to resend just for that. I'll add

Fixes: 738a1cfec2ed ("pwm: Add i.MX TPM PWM driver support")
Cc: stable@xxxxxxxxxxxxxxx

when committing.

Thanks
Uwe

Attachment: signature.asc
Description: PGP signature