From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: linux-pwm@vger.kernel.org, "Steven Rostedt" <rostedt@goodmis.org>,
"Masami Hiramatsu" <mhiramat@kernel.org>,
"Michael Hennerich" <michael.hennerich@analog.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Fabrice Gasnier" <fabrice.gasnier@foss.st.com>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Trevor Gamblin <tgamblin@baylibre.com>
Subject: [PATCH v2 0/8] pwm: New abstraction and userspace API
Date: Mon, 15 Jul 2024 13:16:05 +0200 [thread overview]
Message-ID: <cover.1721040875.git.u.kleine-koenig@baylibre.com> (raw)
Hello,
here comes v2 of the series, (implicit) v1 can be found at
https://lore.kernel.org/linux-pwm/cover.1720435656.git.u.kleine-koenig@baylibre.com/.
It implements a new abstraction to model the output waveform of
a PWM. The main improvement is that it defines a duty_offset instead of
a polarity and so allows to model more wave forms. The motivation for
this is that we need a PWM channel to have an offset compared to another
channel from the same chip, that is something like that:
__ __ __
/ \_______________/ \_______________/ \_________
^ __ ^ __ ^ __
____/ \_______________/ \_______________/ \_____
^ ^ ^
Compared to the previous submission the following things changed:
- rebase to current pwm/for-next
- Some more simplifications and cleanups upfront
- new commit to provide API functions for consumers
These were added as needed in the respective commits (and not exported)
before, but it should be easier to review this way.
- Add padding to the userspace struct pwmchip_waveform
- shifted the introduction of some helper functions to earlier commits to have
less code that is introduced in one patch and then refactored in a later one.
- stricter input validation
- implement PWM_IOCTL_ROUNDWF ioctl
- Commit #6 got a change log and sign-off (was #4 before) 🙄
I updated the pwm/chardev branch to hold this series.
I dropped Trevor's R-b tag for patch #5 (patch #3 before) because the
patch was modified in non-trivial ways. I hesitated to keep his T-b for
patch #7 (patch #5 before), because while the axi-pwmgen patch didn't
change, it builds on top of the previous patches. I kept it anyhow.
Thanks to Trevor and Nuno for feedback to the previous submission.
Best regards
Uwe
Uwe Kleine-König (8):
pwm: Simplify pwm_capture()
pwm: Add more locking
pwm: New abstraction for PWM waveforms
pwm: Provide new consumer API functions for waveforms
pwm: Add support for pwmchip devices for faster and easier userspace
access
pwm: Add tracing for waveform callbacks
pwm: axi-pwmgen: Implementation of the waveform callbacks
pwm: stm32: Implementation of the waveform callbacks
drivers/pwm/core.c | 809 +++++++++++++++++++++++++++++++++--
drivers/pwm/pwm-axi-pwmgen.c | 148 +++++--
drivers/pwm/pwm-stm32.c | 605 ++++++++++++++++----------
include/linux/pwm.h | 57 ++-
include/trace/events/pwm.h | 134 +++++-
include/uapi/linux/pwm.h | 25 ++
6 files changed, 1470 insertions(+), 308 deletions(-)
create mode 100644 include/uapi/linux/pwm.h
base-commit: 240b129d597cb8a8880eb3a381ff10eb98ca0c07
prerequisite-patch-id: 0e21153cd012f41ba9db52357fd08219af53e26c
prerequisite-patch-id: b22c91bbc4e3412f8e7e1f796ed18570ae021c96
--
2.43.0
next reply other threads:[~2024-07-15 11:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-15 11:16 Uwe Kleine-König [this message]
2024-07-15 11:16 ` [PATCH v2 1/8] pwm: Simplify pwm_capture() Uwe Kleine-König
2024-07-15 11:16 ` [PATCH v2 2/8] pwm: Add more locking Uwe Kleine-König
2024-07-15 16:56 ` David Lechner
2024-07-15 20:08 ` Uwe Kleine-König
2024-07-15 11:16 ` [PATCH v2 3/8] pwm: New abstraction for PWM waveforms Uwe Kleine-König
2024-07-15 18:55 ` David Lechner
2024-07-15 20:17 ` Uwe Kleine-König
2024-07-16 7:29 ` Nuno Sá
2024-07-15 11:16 ` [PATCH v2 4/8] pwm: Provide new consumer API functions for waveforms Uwe Kleine-König
2024-07-15 22:23 ` David Lechner
2024-07-16 7:06 ` Uwe Kleine-König
2024-07-16 14:28 ` David Lechner
2024-07-17 9:13 ` Uwe Kleine-König
2024-07-15 11:16 ` [PATCH v2 5/8] pwm: Add support for pwmchip devices for faster and easier userspace access Uwe Kleine-König
2024-07-15 19:37 ` David Lechner
2024-07-15 19:52 ` Uwe Kleine-König
2024-07-30 10:26 ` Uwe Kleine-König
2024-07-30 18:41 ` David Lechner
2024-07-31 6:49 ` Uwe Kleine-König
2024-07-15 11:16 ` [PATCH v2 6/8] pwm: Add tracing for waveform callbacks Uwe Kleine-König
2024-07-15 11:16 ` [PATCH v2 7/8] pwm: axi-pwmgen: Implementation of the " Uwe Kleine-König
2024-07-15 11:16 ` [PATCH v2 8/8] pwm: stm32: " 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.1721040875.git.u.kleine-koenig@baylibre.com \
--to=u.kleine-koenig@baylibre.com \
--cc=alexandre.torgue@foss.st.com \
--cc=fabrice.gasnier@foss.st.com \
--cc=linux-pwm@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mhiramat@kernel.org \
--cc=michael.hennerich@analog.com \
--cc=nuno.sa@analog.com \
--cc=rostedt@goodmis.org \
--cc=tgamblin@baylibre.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