From: Patrice Chotard Date: Fri, 22 Apr 2022 07:38:29 +0000 (+0200) Subject: pinctrl: pinctrl_stm32: Update pinmux_mode definition X-Git-Tag: v2025.01-rc5-pxa1908~1407^2~17 X-Git-Url: http://git.dujemihanovic.xyz/html/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=4382e55c428269c36777b20d7103afbf6be67041;p=u-boot.git pinctrl: pinctrl_stm32: Update pinmux_mode definition pinmux_mode[] is linked to gpio_function[] defined in gpio-uclass.c So reuse the same gpio_func_t enum value Signed-off-by: Patrice Chotard Reviewed-by: Patrick Delaunay --- diff --git a/drivers/pinctrl/pinctrl_stm32.c b/drivers/pinctrl/pinctrl_stm32.c index 5729799b12..5d8e156d62 100644 --- a/drivers/pinctrl/pinctrl_stm32.c +++ b/drivers/pinctrl/pinctrl_stm32.c @@ -42,13 +42,12 @@ struct stm32_gpio_bank { #ifndef CONFIG_SPL_BUILD static char pin_name[PINNAME_SIZE]; -#define PINMUX_MODE_COUNT 5 -static const char * const pinmux_mode[PINMUX_MODE_COUNT] = { - "gpio input", - "gpio output", - "analog", - "unknown", - "alt function", +static const char * const pinmux_mode[GPIOF_COUNT] = { + [GPIOF_INPUT] = "gpio input", + [GPIOF_OUTPUT] = "gpio output", + [GPIOF_UNUSED] = "analog", + [GPIOF_UNKNOWN] = "unknown", + [GPIOF_FUNC] = "alt function", }; static const char * const pinmux_bias[] = {