Skip to content

Commit 54a687c

Browse files
andy-shevBartosz Golaszewski
authored andcommitted
gpiolib: Show more info for interrupt only lines in debugfs
Show more info for interrupt only lines in debugfs. It's useful to monitor the lines that have been never requested as GPIOs, but IRQs. Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 5a646e0 commit 54a687c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpio/gpiolib.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4795,11 +4795,11 @@ static void gpiolib_dbg_show(struct seq_file *s, struct gpio_device *gdev)
47954795

47964796
for_each_gpio_desc(gc, desc) {
47974797
guard(srcu)(&desc->gdev->desc_srcu);
4798-
if (test_bit(FLAG_REQUESTED, &desc->flags)) {
4798+
is_irq = test_bit(FLAG_USED_AS_IRQ, &desc->flags);
4799+
if (is_irq || test_bit(FLAG_REQUESTED, &desc->flags)) {
47994800
gpiod_get_direction(desc);
48004801
is_out = test_bit(FLAG_IS_OUT, &desc->flags);
48014802
value = gpio_chip_get_value(gc, desc);
4802-
is_irq = test_bit(FLAG_USED_AS_IRQ, &desc->flags);
48034803
active_low = test_bit(FLAG_ACTIVE_LOW, &desc->flags);
48044804
seq_printf(s, " gpio-%-3u (%-20.20s|%-20.20s) %s %s %s%s\n",
48054805
gpio, desc->name ?: "", gpiod_get_label(desc),

0 commit comments

Comments
 (0)