Thread (105 messages) 105 messages, 10 authors, 2016-04-14
STALE3697d
Revisions (3)
  1. v4 [diff vs current]
  2. v5 current
  3. v5 [diff vs current]

[PATCH v5 20/46] pwm: add information about polarity, duty cycle and period to debugfs

From: Boris Brezillon <hidden>
Date: 2016-03-30 20:05:12
Also in: dri-devel, intel-gfx, linux-clk, linux-fbdev, linux-input, linux-leds, linux-pwm, linux-rockchip, linux-samsung-soc, lkml
Subsystem: pwm subsystem, the rest · Maintainers: Uwe Kleine-König, Linus Torvalds

From: Heiko St?bner <heiko@sntech.de>

The pwm-states make it possible to also output the polarity, duty cycle
and period information in the debugfs pwm summary-outout.
This makes it easier to gather overview information about pwms without
needing to walk through the sysfs attributes of every pwm.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Boris Brezillon <redacted>
---
 drivers/pwm/core.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index c2b1569..9a83840 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -894,6 +894,11 @@ static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s)
 		if (pstate.enabled)
 			seq_puts(s, " enabled");
 
+		seq_printf(s, " period:%uns", pstate.period);
+		seq_printf(s, " duty:%uns", pstate.duty_cycle);
+		seq_printf(s, " polarity:%s",
+			   pstate.polarity ? "inverse" : "normal");
+
 		seq_puts(s, "\n");
 	}
 }
-- 
2.5.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help