mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
pwm: add devm_pwm_get() and devm_pwm_put()
Add resource managed variants of pwm_get() and pwm_put() for convenience. Code is largely inspired by the equivalent devm functions of the regulator framework. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
This commit is contained in:
parent
0aa0869c3c
commit
6354316dbe
4 changed files with 67 additions and 1 deletions
|
|
@ -36,7 +36,8 @@ 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.
|
||||
device or a consumer name. pwm_put() is used to free the PWM device. Managed
|
||||
variants of these functions, devm_pwm_get() and devm_pwm_put(), also exist.
|
||||
|
||||
After being requested a PWM has to be configured using:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue