aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pwm/core.c')
-rw-r--r--drivers/pwm/core.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 4a13da48fefe..32221cb0cbe7 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -211,6 +211,7 @@ int pwm_set_chip_data(struct pwm_device *pwm, void *data)
211 211
212 return 0; 212 return 0;
213} 213}
214EXPORT_SYMBOL_GPL(pwm_set_chip_data);
214 215
215/** 216/**
216 * pwm_get_chip_data() - get private chip data for a PWM 217 * pwm_get_chip_data() - get private chip data for a PWM
@@ -220,6 +221,7 @@ void *pwm_get_chip_data(struct pwm_device *pwm)
220{ 221{
221 return pwm ? pwm->chip_data : NULL; 222 return pwm ? pwm->chip_data : NULL;
222} 223}
224EXPORT_SYMBOL_GPL(pwm_get_chip_data);
223 225
224/** 226/**
225 * pwmchip_add() - register a new PWM chip 227 * pwmchip_add() - register a new PWM chip
@@ -763,6 +765,18 @@ void devm_pwm_put(struct device *dev, struct pwm_device *pwm)
763} 765}
764EXPORT_SYMBOL_GPL(devm_pwm_put); 766EXPORT_SYMBOL_GPL(devm_pwm_put);
765 767
768/**
769 * pwm_can_sleep() - report whether PWM access will sleep
770 * @pwm: PWM device
771 *
772 * It returns true if accessing the PWM can sleep, false otherwise.
773 */
774bool pwm_can_sleep(struct pwm_device *pwm)
775{
776 return pwm->chip->can_sleep;
777}
778EXPORT_SYMBOL_GPL(pwm_can_sleep);
779
766#ifdef CONFIG_DEBUG_FS 780#ifdef CONFIG_DEBUG_FS
767static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s) 781static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s)
768{ 782{