Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <linus.walleij@linaro.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240530191418.1138003-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

authored by

Andy Shevchenko and committed by
Bartosz Golaszewski
54a687cd 5a646e03

+2 -2
+2 -2
drivers/gpio/gpiolib.c
··· 4795 4795 4796 4796 for_each_gpio_desc(gc, desc) { 4797 4797 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)) { 4799 4800 gpiod_get_direction(desc); 4800 4801 is_out = test_bit(FLAG_IS_OUT, &desc->flags); 4801 4802 value = gpio_chip_get_value(gc, desc); 4802 - is_irq = test_bit(FLAG_USED_AS_IRQ, &desc->flags); 4803 4803 active_low = test_bit(FLAG_ACTIVE_LOW, &desc->flags); 4804 4804 seq_printf(s, " gpio-%-3u (%-20.20s|%-20.20s) %s %s %s%s\n", 4805 4805 gpio, desc->name ?: "", gpiod_get_label(desc),