summaryrefslogtreecommitdiff
path: root/include/linux/pwm.h
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2012-03-26 09:31:48 +0200
committerThierry Reding <thierry.reding@avionic-design.de>2012-06-15 12:56:53 +0200
commit62099abf67a20cfb98d4c031fb1925e10a78ee1b (patch)
tree5d4d68e642e4a632111f4f179c1e0edfc989429c /include/linux/pwm.h
parentf051c466cf690ac661d713d3ceb56b4efcecc853 (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/linux/pwm.h')
-rw-r--r--include/linux/pwm.h6
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 @@
#define __LINUX_PWM_H
struct pwm_device;
+struct seq_file;
/*
* pwm_request - request a PWM device
@@ -65,6 +66,7 @@ static inline unsigned int pwm_get_period(struct pwm_device *pwm)
* @config: configure duty cycles and period length for this PWM
* @enable: enable PWM output toggling
* @disable: disable PWM output toggling
+ * @dbg_show: optional routine to show contents in debugfs
* @owner: helps prevent removal of modules exporting active PWMs
*/
struct pwm_ops {
@@ -79,6 +81,10 @@ struct pwm_ops {
struct pwm_device *pwm);
void (*disable)(struct pwm_chip *chip,
struct pwm_device *pwm);
+#ifdef CONFIG_DEBUG_FS
+ void (*dbg_show)(struct pwm_chip *chip,
+ struct seq_file *s);
+#endif
struct module *owner;
};