Skip to content

pwm: userspace support

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v7 Latest4 patches 2 repliesIn review

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4pwm: Let pwm_set_waveform_might_sleep() fail for exact but impossible requestsdrivers/pwm/core.c+16 -50 replies
2/4pwm: Let pwm_set_waveform_might_sleep() return 0 instead of 1 after rounding updrivers/pwm/core.c+8 -60 replies
3/4pwm: Formally describe the procedure used to pick a hardware waveform settingdrivers/pwm/core.c+23 -10 replies
4/4pwm: Add support for pwmchip devices for faster and easier userspace accessdrivers/pwm/core.c include/linux/pwm.h include/uapi/linux/pwm.h+363 -150 replies

Reviews trailers per patch

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

Read the v7 thread

Cover letter [PATCH v7 0/4] pwm: userspace support

Hello,

after the feedback I got from David on v7[1] and some internal discussion here comes a new version of the patch.

Apart from rebasing to a newer base (current pwm/for-next) the only change in the relevant patch #4 about return values from the PWM_IOCTL_SETEXACTWF ioctl. Instead of returning 1 if the request failed to apply exactly, return -EDOM.

The earlier patches in this series prepare that and implement a similar change in pwm_set_waveform_might_sleep() to simplify also other users of this function. Patch #3 is only a documentation update that is not strictly related to the userspace chardev, but reflects the changes in patches #1 and #2.

Feedback welcome.

Best regards
Uwe

[1] https://lore.kernel.org/linux-pwm/[email protected]

Uwe Kleine-König (4):
pwm: Let pwm_set_waveform_might_sleep() fail for exact but impossible
requests
pwm: Let pwm_set_waveform_might_sleep() return 0 instead of 1 after
rounding up
pwm: Formally describe the procedure used to pick a hardware waveform
setting
pwm: Add support for pwmchip devices for faster and easier userspace
access

 drivers/pwm/core.c       | 369 ++++++++++++++++++++++++++++++++++++---
 include/linux/pwm.h      |   3 +
 include/uapi/linux/pwm.h |  53 ++++++
 3 files changed, 404 insertions(+), 21 deletions(-)
 create mode 100644 include/uapi/linux/pwm.h

base-commit: e373991eb9ff0a9617634017c7f19fd36ec4f208

Signature · 1 line
2.47.2