GPIOs showed up as unclaimed in debugfs, so they could be muxed to something else even though they were in use. Mark GPIOs as claimed when in use to avoid that. Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> --- To be queued in renesas-pinctrl for v6.13. On RZA2M-EVB, /sys/kernel/debug/pinctrl/fcffe000.pinctrl-pinctrl-rza2/pinmux-pins changes: @@ -48,7 +48,7 @@ pin 45 (P5_5): device e822a000.mmc function sdhi1 group sdhi1 pin 46 (P5_6): UNCLAIMED pin 47 (P5_7): UNCLAIMED -pin 48 (P6_0): UNCLAIMED +pin 48 (P6_0): GPIO pinctrl:560 pin 49 (P6_1): UNCLAIMED pin 50 (P6_2): UNCLAIMED pin 51 (P6_3): UNCLAIMED @@ -97,7 +97,7 @@ pin 94 (PB_6): UNCLAIMED pin 95 (PB_7): UNCLAIMED pin 96 (PC_0): UNCLAIMED -pin 97 (PC_1): UNCLAIMED +pin 97 (PC_1): GPIO pinctrl:609 pin 98 (PC_2): UNCLAIMED pin 99 (PC_3): UNCLAIMED pin 100 (PC_4): UNCLAIMED --- drivers/pinctrl/renesas/pinctrl-rza2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pinctrl/renesas/pinctrl-rza2.c b/drivers/pinctrl/renesas/pinctrl-rza2.c index af689d7c117f3548..dd1f8c29d3e7557b 100644 --- a/drivers/pinctrl/renesas/pinctrl-rza2.c +++ b/drivers/pinctrl/renesas/pinctrl-rza2.c @@ -16,6 +16,7 @@ #include <linux/module.h> #include <linux/mutex.h> #include <linux/of.h> +#include <linux/pinctrl/consumer.h> #include <linux/pinctrl/pinmux.h> #include <linux/platform_device.h> @@ -229,6 +230,8 @@ static const char * const rza2_gpio_names[] = { static struct gpio_chip chip = { .names = rza2_gpio_names, .base = -1, + .request = pinctrl_gpio_request, + .free = pinctrl_gpio_free, .get_direction = rza2_chip_get_direction, .direction_input = rza2_chip_direction_input, .direction_output = rza2_chip_direction_output, -- 2.34.1