Re: [PATCH v2] pwm: imx27: Fix variable truncation in .apply()
From: Uwe Kleine-König
Date: Sat May 23 2026 - 12:55:48 EST
Hello Ronaldo,
On Fri, May 22, 2026 at 04:13:48PM -0300, Ronaldo Nunez wrote:
> Fix a variable truncation when calculating period in microseconds as
> part of the solution for the ERR051198 in .apply() callback.
>
> Example scenario:
> - Period of 3us (PWMPR = 196 and prescaler = 1)
> - Expected value in tmp: 198000000000 (NSEC_PER_SEC * (196 + 2) * 1)
> - Actual value is 431504384 (truncation to u32)
>
> Signed-off-by: Ronaldo Nunez <rnunez@xxxxxxxxxxxx>
Thanks for your patch. I added
Fixes: a25351e4c774 ("pwm: imx27: Workaround of the pwm output bug when decrease the duty cycle")
to the trailers and applied it to
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/fixes
. I haven't made up my mind if I create another pull request to get the
patches from the pwm/fixes branch into 7.1. If not, it will go into
7.2-rc1.
Sashiko found a few more issues in the imx27 driver, would you like to
address these, too?
Best regards
Uwe
Attachment:
signature.asc
Description: PGP signature