[PATCH v3] pwm: imx-tpm: count the number of enabled channels in probe
Uwe Kleine-König
ukleinek at kernel.org
Fri Mar 13 02:32:28 PDT 2026
Hello,
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.
>
> Signed-off-by: Viorel Suman (OSS) <viorel.suman at oss.nxp.com>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next
with Cc: stable. Given that the issue is already old (May 2019 in
5.2-rc1) I tend to not send it for inclusion into v7.0, but if something
more urgent pops up I'll probably send it along.
Best regards
Uwe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260313/6c513181/attachment.sig>
More information about the linux-arm-kernel
mailing list