mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
pwm: Add pwm_can_sleep() as exported API to users
Calls to some external PWM chips can sleep. To help users, add pwm_can_sleep() API. Cc: Thierry Reding <[email protected]> Cc: Peter Ujfalusi <[email protected]> Signed-off-by: Florian Vaussard <[email protected]> Reviewed-by: Peter Ujfalusi <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
This commit is contained in:
parent
0132267d65
commit
6e69ab1361
2 changed files with 22 additions and 0 deletions
|
|
@ -733,6 +733,18 @@ void devm_pwm_put(struct device *dev, struct pwm_device *pwm)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(devm_pwm_put);
|
||||
|
||||
/**
|
||||
* pwm_can_sleep() - report whether PWM access will sleep
|
||||
* @pwm: PWM device
|
||||
*
|
||||
* It returns true if accessing the PWM can sleep, false otherwise.
|
||||
*/
|
||||
bool pwm_can_sleep(struct pwm_device *pwm)
|
||||
{
|
||||
return pwm->chip->can_sleep;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pwm_can_sleep);
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue