summaryrefslogtreecommitdiff
path: root/Documentation/driver-api
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-05-03 11:25:01 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-05-03 11:25:01 -0700
commit89b7fd5d7f3ceda236cc1d0026986a5f57ecaf4a (patch)
treeb7eb50d66667083fdc92f42048a1f7fb3383c884 /Documentation/driver-api
parent4c9818d8652b9824c73e456dd0d73ffba1d0e64d (diff)
parent247ee6c780406513c6031a7f4ea41f1648b03295 (diff)
downloadlinux-89b7fd5d7f3ceda236cc1d0026986a5f57ecaf4a.tar.gz
Merge tag 'pwm/for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
Pull pwm updates from Thierry Reding: "The bulk of this is trivial conversions to the new .remove_new() callback for drivers as part of Uwe's effort to clean that up. Other than that a driver is added for Apple devices and various small fixes are included for existing drivers. Last but not least, this finally gets rid of the old pwm_request() and pwm_free() APIs are removed since the last user was dropped in v6.3" * tag 'pwm/for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (44 commits) pwm: Remove unused radix tree pwm: Delete deprecated functions pwm_request() and pwm_free() pwm: meson: Fix g12a ao clk81 name pwm: meson: Fix axg ao mux parents pwm: stm32: Enforce settings for PWM capture MAINTAINERS: Add entries for Apple PWM driver pwm: Add Apple PWM controller dt-bindings: pwm: Add Apple PWM controller pwm: mtk-disp: Configure double buffering before reading in .get_state() pwm: mtk-disp: Disable shadow registers before setting backlight values pwm: stm32-lp: Drop of_match_ptr for ID table pwm: rcar: Drop of_match_ptr for ID table dt-bindings: pwm: Convert Amlogic Meson PWM binding dt-bindings: pwm: mediatek: Add mediatek,mt7986 compatible pwm: xilinx: Convert to platform remove callback returning void pwm: vt8500: Convert to platform remove callback returning void pwm: tiehrpwm: Convert to platform remove callback returning void pwm: tiecap: Convert to platform remove callback returning void pwm: tegra: Convert to platform remove callback returning void pwm: sun4i: Convert to platform remove callback returning void ...
Diffstat (limited to 'Documentation/driver-api')
-rw-r--r--Documentation/driver-api/pwm.rst13
1 files changed, 5 insertions, 8 deletions
diff --git a/Documentation/driver-api/pwm.rst b/Documentation/driver-api/pwm.rst
index 8c71a2055d27..3fdc95f7a1d1 100644
--- a/Documentation/driver-api/pwm.rst
+++ b/Documentation/driver-api/pwm.rst
@@ -35,12 +35,9 @@ consumers to providers, as given in the following example::
Using PWMs
----------
-Legacy users can request a PWM device using pwm_request() and free it
-after usage with pwm_free().
-
-New users should use the pwm_get() function and pass to it the consumer
-device or a consumer name. pwm_put() is used to free the PWM device. Managed
-variants of the getter, devm_pwm_get() and devm_fwnode_pwm_get(), also exist.
+Consumers use the pwm_get() function and pass to it the consumer device or a
+consumer name. pwm_put() is used to free the PWM device. Managed variants of
+the getter, devm_pwm_get() and devm_fwnode_pwm_get(), also exist.
After being requested, a PWM has to be configured using::
@@ -165,8 +162,8 @@ consumers should implement it as described in the "Using PWMs" section.
Locking
-------
-The PWM core list manipulations are protected by a mutex, so pwm_request()
-and pwm_free() may not be called from an atomic context. Currently the
+The PWM core list manipulations are protected by a mutex, so pwm_get()
+and pwm_put() may not be called from an atomic context. Currently the
PWM core does not enforce any locking to pwm_enable(), pwm_disable() and
pwm_config(), so the calling context is currently driver specific. This
is an issue derived from the former barebone API and should be fixed soon.