]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
pwm: Provide a gpio device for waveform drivers
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Thu, 17 Jul 2025 15:11:16 +0000 (17:11 +0200)
committerUwe Kleine-König <ukleinek@kernel.org>
Mon, 15 Sep 2025 09:39:44 +0000 (11:39 +0200)
commite7c9b66b106989aeb17b167f5bbea9a108d26c0d
treecac64067492ab8042205b9641198e409bfbdb733
parentb871d093f1caebeb39b12136a33e7529b8fdea50
pwm: Provide a gpio device for waveform drivers

A PWM is a more general concept than an output-only GPIO. When using
duty_length = period_length the PWM looks like an active GPIO, with
duty_length = 0 like an inactive GPIO. With the waveform abstraction
there is enough control over the configuration to ensure that PWMs that
cannot generate a constant signal at both levels error out.

The pwm-pca9685 driver already provides a gpio chip. When this driver is
converted to the waveform callbacks, the gpio part can just be dropped.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20250717151117.1828585-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
drivers/pwm/Kconfig
drivers/pwm/core.c
include/linux/pwm.h