Commit 0360a487 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Thierry Reding

pwm: Mention PWM chip ID in /sys/kernel/debug/pwm

While it's not hard to match the entries from /sys/kernel/debug/pwm to
the corresponding pwmchip in /sys/class/pwm, it's a bit simpler to have
the number mentioned in /sys/kernel/debug/pwm.

Link: https://lore.kernel.org/r/20230808165250.942396-3-u.kleine-koenig@pengutronix.deSigned-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 54c86dd2
...@@ -1062,7 +1062,8 @@ static int pwm_seq_show(struct seq_file *s, void *v) ...@@ -1062,7 +1062,8 @@ static int pwm_seq_show(struct seq_file *s, void *v)
{ {
struct pwm_chip *chip = v; struct pwm_chip *chip = v;
seq_printf(s, "%s%s/%s, %d PWM device%s\n", (char *)s->private, seq_printf(s, "%s%d: %s/%s, %d PWM device%s\n",
(char *)s->private, chip->id,
chip->dev->bus ? chip->dev->bus->name : "no-bus", chip->dev->bus ? chip->dev->bus->name : "no-bus",
dev_name(chip->dev), chip->npwm, dev_name(chip->dev), chip->npwm,
(chip->npwm != 1) ? "s" : ""); (chip->npwm != 1) ? "s" : "");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment