[PATCH v7 0/4] pwm: userspace support

Uwe Kleine-König posted 4 patches 9 months, 1 week ago
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
[PATCH v7 0/4] pwm: userspace support
Posted by Uwe Kleine-König 9 months, 1 week ago
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/20250416094316.2494767-2-u.kleine-koenig@baylibre.com

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
-- 
2.47.2

Re: [PATCH v7 0/4] pwm: userspace support
Posted by Uwe Kleine-König 9 months ago
Hello,

On Wed, Apr 30, 2025 at 01:55:57PM +0200, Uwe Kleine-König wrote:
> 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.

I hope that no feedback is good feedback and pushed that series. The
first three patches to

	https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next

as v6.16-rc1 material. The last patch only to pwm/for-nexxt which I will
push to next after v6.16-rc1 to give that a long time in next before
going into a release.

Best regards
Uwe
Re: [PATCH v7 0/4] pwm: userspace support
Posted by Uwe Kleine-König 9 months, 1 week ago
On Wed, Apr 30, 2025 at 01:55:57PM +0200, Uwe Kleine-König wrote:
> after the feedback I got from David on v7[1] and some internal
> discussion here comes a new version of the patch.

So given that v7 was the previous revision of this patch set this should
have been v8. :-\

I hope all the annoyance that results from that fat-fingering is on my
side only. Sorry.

Best regards
Uwe