gpio: sunxi: Remove the sunxi_name_to_gpio_bank function
authorSamuel Holland <samuel@sholland.org>
Sun, 12 Sep 2021 15:28:36 +0000 (10:28 -0500)
committerAndre Przywara <andre.przywara@arm.com>
Mon, 11 Oct 2021 09:46:44 +0000 (10:46 +0100)
The only caller of this function was the MMC pinmux code, which used it
to parse a string given from a Kconfig symbol. As the Kconfig symbol has
been converted to a Boolean, this function is no longer needed.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
arch/arm/include/asm/arch-sunxi/gpio.h
drivers/gpio/sunxi_gpio.c

index 43b1b97..c595dcc 100644 (file)
@@ -238,7 +238,6 @@ int sunxi_gpio_get_cfgbank(struct sunxi_gpio *pio, int bank_offset);
 int sunxi_gpio_get_cfgpin(u32 pin);
 int sunxi_gpio_set_drv(u32 pin, u32 val);
 int sunxi_gpio_set_pull(u32 pin, u32 val);
-int sunxi_name_to_gpio_bank(const char *name);
 int sunxi_name_to_gpio(const char *name);
 #define name_to_gpio(name) sunxi_name_to_gpio(name)
 
index 24cb604..c5d73d0 100644 (file)
@@ -118,20 +118,6 @@ int sunxi_name_to_gpio(const char *name)
 }
 #endif /* DM_GPIO */
 
-int sunxi_name_to_gpio_bank(const char *name)
-{
-       int group = 0;
-
-       if (*name == 'P' || *name == 'p')
-               name++;
-       if (*name >= 'A') {
-               group = *name - (*name > 'a' ? 'a' : 'A');
-               return group;
-       }
-
-       return -1;
-}
-
 #if CONFIG_IS_ENABLED(DM_GPIO)
 /* TODO(sjg@chromium.org): Remove this function and use device tree */
 int sunxi_name_to_gpio(const char *name)