Linux PWM subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/8] pwm: New abstraction and userspace API
@ 2024-07-15 11:16 Uwe Kleine-König
  2024-07-15 11:16 ` [PATCH v2 1/8] pwm: Simplify pwm_capture() Uwe Kleine-König
                   ` (7 more replies)
  0 siblings, 8 replies; 23+ messages in thread
From: Uwe Kleine-König @ 2024-07-15 11:16 UTC (permalink / raw)
  To: linux-pwm, Steven Rostedt, Masami Hiramatsu, Michael Hennerich,
	Nuno Sá, Fabrice Gasnier, Maxime Coquelin, Alexandre Torgue
  Cc: Mathieu Desnoyers, Trevor Gamblin

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


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

end of thread, other threads:[~2024-07-31  6:50 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-15 11:16 [PATCH v2 0/8] pwm: New abstraction and userspace API Uwe Kleine-König
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

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