diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-11-14 12:20:13 +0100 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2023-12-20 16:04:13 +0100 |
commit | 0360a48733729f9329483409acd048d04b43ee17 (patch) | |
tree | 3fa93759d246c8e1910b54bbaf361912800d14bb /drivers/pwm | |
parent | 54c86dd20bba23109e32e4e2f94ff93dd9863bc3 (diff) | |
download | lwn-0360a48733729f9329483409acd048d04b43ee17.tar.gz lwn-0360a48733729f9329483409acd048d04b43ee17.zip |
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>
Diffstat (limited to 'drivers/pwm')
-rw-r--r-- | drivers/pwm/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index ebe404dfdf5b..fb36b3d559a7 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -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" : ""); |