提交 23e3523f 编写于 作者: H Heiko Stübner 提交者: Thierry Reding

pwm: Add information about polarity, duty cycle and period to debugfs

The PWM states make it possible to also output the polarity, duty cycle
and period information in the debugfs summary output. This simplifies
gathering information about PWMs without needing to walk through the
sysfs attributes of every PWM.
Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
[thierry.reding@gmail.com: use more spaces in debugfs output]
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 39100cee
......@@ -960,6 +960,11 @@ static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s)
if (state.enabled)
seq_puts(s, " enabled");
seq_printf(s, " period: %u ns", state.period);
seq_printf(s, " duty: %u ns", state.duty_cycle);
seq_printf(s, " polarity: %s",
state.polarity ? "inverse" : "normal");
seq_puts(s, "\n");
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册