[Linux-stm32] [PATCH v1 0/2] pwm: stm32: A rounding fix and a cleanup
Uwe Kleine-König
u.kleine-koenig at baylibre.com
Wed Apr 15 14:50:11 UTC 2026
Hello,
I extended pwmtestperf (part of libpwm[1]) to allow testing inversed
polarity wave forms. I'm not sure if I should like it or not, but this
immediately showed a rounding issue in the stm32 pwm driver. This is
fixed in the first commit.
The 2nd commit is just a cleanup that I have on my todo list for a
while. This required the addition of mul_u64_u64_div_u64_roundup() which
exists since v6.19-rc1~70^2~90.
I intend to send the fix to Linus before 7.1, but will give it a bit of
time in next before. The cleanup will wait until the next merge window.
Best regards
Uwe
[1] https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/libpwm.git
Uwe Kleine-König (2):
pwm: stm32: Fix rounding issue for requests with inverted polarity
pwm: stm32: Make use of mul_u64_u64_div_u64_roundup()
drivers/pwm/pwm-stm32.c | 49 ++++++++++++++---------------------------
1 file changed, 17 insertions(+), 32 deletions(-)
base-commit: 028ef9c96e96197026887c0f092424679298aae8
--
2.47.3
More information about the Linux-stm32
mailing list