]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
pinctrl: renesas: rza2: Mark GPIOs as used
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 30 Sep 2024 15:47:19 +0000 (17:47 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 1 Oct 2024 07:15:45 +0000 (09:15 +0200)
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.

Reported-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/2862093f7701dcaf29f37c0b2f9268234168338f.1727711124.git.geert+renesas@glider.be
drivers/pinctrl/renesas/pinctrl-rza2.c

index af689d7c117f35482487a0e2fa1f5bc45e5fa262..dd1f8c29d3e7557b2cb761eb1916c9139f6054db 100644 (file)
@@ -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,