diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2012-03-26 03:31:48 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@avionic-design.de> | 2012-06-15 06:56:53 -0400 |
commit | 62099abf67a20cfb98d4c031fb1925e10a78ee1b (patch) | |
tree | 5d4d68e642e4a632111f4f179c1e0edfc989429c /include | |
parent | f051c466cf690ac661d713d3ceb56b4efcecc853 (diff) |
pwm: Add debugfs interface
This commit adds a debugfs interface that can be used to list the
current internal state of the PWM devices registered with the PWM
framework.
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reviewed-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pwm.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/pwm.h b/include/linux/pwm.h index 57103911f4c7..047cd5351a3b 100644 --- a/include/linux/pwm.h +++ b/include/linux/pwm.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __LINUX_PWM_H | 2 | #define __LINUX_PWM_H |
3 | 3 | ||
4 | struct pwm_device; | 4 | struct pwm_device; |
5 | struct seq_file; | ||
5 | 6 | ||
6 | /* | 7 | /* |
7 | * pwm_request - request a PWM device | 8 | * pwm_request - request a PWM device |
@@ -65,6 +66,7 @@ static inline unsigned int pwm_get_period(struct pwm_device *pwm) | |||
65 | * @config: configure duty cycles and period length for this PWM | 66 | * @config: configure duty cycles and period length for this PWM |
66 | * @enable: enable PWM output toggling | 67 | * @enable: enable PWM output toggling |
67 | * @disable: disable PWM output toggling | 68 | * @disable: disable PWM output toggling |
69 | * @dbg_show: optional routine to show contents in debugfs | ||
68 | * @owner: helps prevent removal of modules exporting active PWMs | 70 | * @owner: helps prevent removal of modules exporting active PWMs |
69 | */ | 71 | */ |
70 | struct pwm_ops { | 72 | struct pwm_ops { |
@@ -79,6 +81,10 @@ struct pwm_ops { | |||
79 | struct pwm_device *pwm); | 81 | struct pwm_device *pwm); |
80 | void (*disable)(struct pwm_chip *chip, | 82 | void (*disable)(struct pwm_chip *chip, |
81 | struct pwm_device *pwm); | 83 | struct pwm_device *pwm); |
84 | #ifdef CONFIG_DEBUG_FS | ||
85 | void (*dbg_show)(struct pwm_chip *chip, | ||
86 | struct seq_file *s); | ||
87 | #endif | ||
82 | struct module *owner; | 88 | struct module *owner; |
83 | }; | 89 | }; |
84 | 90 | ||