summaryrefslogtreecommitdiff
path: root/drivers/pwm
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-11-14 12:20:13 +0100
committerThierry Reding <thierry.reding@gmail.com>2023-12-20 16:04:13 +0100
commit0360a48733729f9329483409acd048d04b43ee17 (patch)
tree3fa93759d246c8e1910b54bbaf361912800d14bb /drivers/pwm
parent54c86dd20bba23109e32e4e2f94ff93dd9863bc3 (diff)
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.c3
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" : "");