From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: Fabrice Gasnier <fabrice.gasnier@foss.st.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Andrea della Porta <andrea.porta@suse.com>,
linux-pwm@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com
Subject: [PATCH v1 0/2] pwm: stm32: A rounding fix and a cleanup
Date: Wed, 15 Apr 2026 16:50:11 +0200 [thread overview]
Message-ID: <cover.1776264104.git.u.kleine-koenig@baylibre.com> (raw)
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
next reply other threads:[~2026-04-15 14:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-15 14:50 Uwe Kleine-König [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1776264104.git.u.kleine-koenig@baylibre.com \
--to=u.kleine-koenig@baylibre.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrea.porta@suse.com \
--cc=fabrice.gasnier@foss.st.com \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox