Skip to content

pwm: pwmchip character device

Uwe Kleine-König linux-pwm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v6 Latest2 patches 3 repliesIn review

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2pwm: Better document return value of pwm_round_waveform_might_sleep()drivers/pwm/core.c+6 -20 replies
2/2pwm: Add support for pwmchip devices for faster and easier userspace accessdrivers/pwm/core.c include/linux/pwm.h include/uapi/linux/pwm.h+343 -152 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.

Read the v6 thread

Cover letter [PATCH v6 0/2] pwm: pwmchip character device

Hello,

after
https://lore.kernel.org/lkml/[email protected]/
(v5) here comes a new revision of the pwm character device support. v5 consisted of 8 patches, the first 7 are in mainline already, so it's only patch 2 of this series that is left. The first patch is just a doc cleanup that I created while working on this code.

There is a userspace library with a few helper tools available at
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/libpwm.git.

Relevant changes since the last submission:

- (A bit) more documentation in form of code comments

- Make pid of userspace process that requests a PWM visible in /sys/kernel/debug/pwm

- The (in kernel) convention that rounding functions return 1 on rounding up is hidden to userspace. It's not so relevant there because userspace only works with the generic waveform description based on ns, and so different waveforms are easily comparable and so the need for an extra signal about up-rounding isn't critical.

this is based on my current pwm/for-next branch, the current state is also available at

https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/chardev

Best regards
Uwe

Uwe Kleine-König (2):
pwm: Better document return value of pwm_round_waveform_might_sleep()
pwm: Add support for pwmchip devices for faster and easier userspace
access

 drivers/pwm/core.c       | 312 ++++++++++++++++++++++++++++++++++++---
 include/linux/pwm.h      |   3 +
 include/uapi/linux/pwm.h |  51 +++++++
 3 files changed, 349 insertions(+), 17 deletions(-)
 create mode 100644 include/uapi/linux/pwm.h

base-commit: 957062f2ba4790c495de606ecf8bc7398c0c710f

Signature · 1 line
2.47.2