summaryrefslogtreecommitdiff
path: root/Documentation/driver-api/driver-model
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2024-02-14 12:30:50 +0300
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2024-02-15 14:59:15 +0300
commit024913dbf99f06f09d5c06c940ca39821697d41c (patch)
treee016c7204bd9829b42f3bb4d39371aba9da5bc16 /Documentation/driver-api/driver-model
parent24003d501f112a9827aa8c59c00e12b2d5cbddf6 (diff)
downloadlinux-024913dbf99f06f09d5c06c940ca39821697d41c.tar.xz
pwm: Provide pwmchip_alloc() function and a devm variant of it
This function allocates a struct pwm_chip and driver data. Compared to the status quo the split into pwm_chip and driver data is new, otherwise it doesn't change anything relevant (yet). The intention is that after all drivers are switched to use this allocation function, its possible to add a struct device to struct pwm_chip to properly track the latter's lifetime without touching all drivers again. Proper lifetime tracking is a necessary precondition to introduce character device support for PWMs (that implements atomic setting and doesn't suffer from the sysfs overhead of the /sys/class/pwm userspace support). The new function pwmchip_priv() (obviously?) only works for chips allocated with pwmchip_alloc(). Link: https://lore.kernel.org/r/9577d6053a5a52536057dc8654ff567181c2da82.1707900770.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'Documentation/driver-api/driver-model')
-rw-r--r--Documentation/driver-api/driver-model/devres.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst
index c5f99d834ec5..e4df72c408d2 100644
--- a/Documentation/driver-api/driver-model/devres.rst
+++ b/Documentation/driver-api/driver-model/devres.rst
@@ -420,6 +420,7 @@ POWER
devm_reboot_mode_unregister()
PWM
+ devm_pwmchip_alloc()
devm_pwmchip_add()
devm_pwm_get()
devm_fwnode_pwm_get()