[PATCH 1/2] pinctrl: stmfx: Fix MAX_PIN_NAME_LEN
Patrice Chotard
patrice.chotard at foss.st.com
Mon Jan 11 15:03:46 CET 2021
MAX_PIN_NAME_LEN is set to 7 whereas stmfx pin name prefix "stmfx_gpio"
is 10 char long. So "pinmux status" output looks like:
STM32MP> pinmux status -a
--------------------------
stmfx at 42:
stmfx_ : input
stmfx_ : input
stmfx_ : input
stmfx_ : input
stmfx_ : input
.....
Set MAX_PIN_NAME_LEN to 13 to get a correct pinmux command output.
Fixes: e27e96aa804e("pinctrl: stmfx: update pin name")
Signed-off-by: Patrice Chotard <patrice.chotard at foss.st.com>
---
drivers/pinctrl/pinctrl-stmfx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
index a62be44d2d..d23ad862f2 100644
--- a/drivers/pinctrl/pinctrl-stmfx.c
+++ b/drivers/pinctrl/pinctrl-stmfx.c
@@ -346,7 +346,7 @@ static int stmfx_pinctrl_get_pins_count(struct udevice *dev)
* STMFX pins[15:0] are called "stmfx_gpio[15:0]"
* and STMFX pins[23:16] are called "stmfx_agpio[7:0]"
*/
-#define MAX_PIN_NAME_LEN 7
+#define MAX_PIN_NAME_LEN 13
static char pin_name[MAX_PIN_NAME_LEN];
static const char *stmfx_pinctrl_get_pin_name(struct udevice *dev,
unsigned int selector)
--
2.17.1
More information about the U-Boot
mailing list