Linux PWM subsystem development
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: linux-pwm@vger.kernel.org
Cc: David Lechner <dlechner@baylibre.com>,
	Kent Gibson <warthog618@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v6 0/2] pwm: pwmchip character device
Date: Tue,  8 Apr 2025 16:23:53 +0200	[thread overview]
Message-ID: <cover.1744120697.git.ukleinek@kernel.org> (raw)

Hello,

after
https://lore.kernel.org/lkml/cover.1726819463.git.u.kleine-koenig@baylibre.com/
(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
-- 
2.47.2


             reply	other threads:[~2025-04-08 14:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-08 14:23 Uwe Kleine-König [this message]
2025-04-08 14:23 ` [PATCH v6 1/2] pwm: Better document return value of pwm_round_waveform_might_sleep() Uwe Kleine-König
2025-04-08 14:23 ` [PATCH v6 2/2] pwm: Add support for pwmchip devices for faster and easier userspace access Uwe Kleine-König
2025-04-08 16:20   ` David Lechner
2025-04-08 20:06     ` Uwe Kleine-König
2025-04-16  8:34 ` [PATCH v6 0/2] pwm: pwmchip character device 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.1744120697.git.ukleinek@kernel.org \
    --to=u.kleine-koenig@baylibre.com \
    --cc=dlechner@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=warthog618@gmail.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