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.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
Uwe Kleine-König 2023-11-14 12:20:13 +01:00 committed by Thierry Reding
parent 54c86dd20b
commit 0360a48733

View File

@ -1062,7 +1062,8 @@ static int pwm_seq_show(struct seq_file *s, void *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",
dev_name(chip->dev), chip->npwm,
(chip->npwm != 1) ? "s" : "");