public inbox for linux-pwm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] pwm: stm32: A rounding fix and a cleanup
@ 2026-04-15 14:50 Uwe Kleine-König
  2026-04-15 14:50 ` [PATCH v1 1/2] pwm: stm32: Fix rounding issue for requests with inverted polarity Uwe Kleine-König
  2026-04-15 14:50 ` [PATCH v1 2/2] pwm: stm32: Make use of mul_u64_u64_div_u64_roundup() Uwe Kleine-König
  0 siblings, 2 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2026-04-15 14:50 UTC (permalink / raw)
  To: Fabrice Gasnier, Maxime Coquelin, Alexandre Torgue
  Cc: Andrea della Porta, linux-pwm, linux-stm32

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-15 14:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-15 14:50 [PATCH v1 0/2] pwm: stm32: A rounding fix and a cleanup Uwe Kleine-König
2026-04-15 14:50 ` [PATCH v1 1/2] pwm: stm32: Fix rounding issue for requests with inverted polarity Uwe Kleine-König
2026-04-15 14:50 ` [PATCH v1 2/2] pwm: stm32: Make use of mul_u64_u64_div_u64_roundup() Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox