Message ID | 20231114112009.340168-4-u.kleine-koenig@pengutronix.de |
---|---|
State | Accepted |
Delegated to: | Uwe Kleine-König |
Headers | show |
Series | pwm: Reorganize PWM identification | expand |
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 586277c3eee4..58a9d3df73a1 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" : "");
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> --- drivers/pwm/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)