Files
linux-stable-mirror/include/uapi/linux
Uwe Kleine-König 9c06f26ba5 pwm: Add support for pwmchip devices for faster and easier userspace access
With this change each pwmchip defining the new-style waveform callbacks
can be accessed from userspace via a character device. Compared to the
sysfs-API this is faster and allows to pass the whole configuration in a
single ioctl allowing atomic application and thus reducing glitches.

On an STM32MP13 I see:

	root@DistroKit:~ time pwmtestperf
	real	0m 1.27s
	user	0m 0.02s
	sys	0m 1.21s
	root@DistroKit:~ rm /dev/pwmchip0
	root@DistroKit:~ time pwmtestperf
	real	0m 3.61s
	user	0m 0.27s
	sys	0m 3.26s

pwmtestperf does essentially:

	for i in 0 .. 50000:
		pwm_set_waveform(duty_length_ns=i, period_length_ns=50000, duty_offset_ns=0)

and in the presence of /dev/pwmchip0 is uses the ioctls introduced here,
without that device it uses /sys/class/pwm/pwmchip0.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/ad4a4e49ae3f8ea81e23cac1ac12b338c3bf5c5b.1746010245.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
2025-07-07 08:39:33 +02:00
..
2025-02-08 15:16:29 +00:00
2025-02-05 13:22:04 +09:00
2025-02-12 02:29:30 +00:00
2025-05-03 12:02:09 +02:00
2025-04-17 11:09:10 +02:00
2025-05-13 11:12:48 +02:00
2025-04-17 12:30:02 +02:00
2025-02-25 18:14:03 -08:00
2025-05-21 13:41:03 +02:00
2025-04-17 12:30:02 +02:00
2025-04-14 09:51:31 -04:00
2025-05-27 10:27:54 -04:00