]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pinctrl: pinctrl_stm32: Use GPIOF_UNKNOWN to indicate not mapped pins
authorPatrice Chotard <patrice.chotard@foss.st.com>
Fri, 22 Apr 2022 07:38:30 +0000 (09:38 +0200)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Tue, 10 May 2022 11:54:48 +0000 (13:54 +0200)
GPIOF_UNKNOWN becomes a valid pin muxing information to indicate
that a pin is not mapped.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
drivers/pinctrl/pinctrl_stm32.c

index 5d8e156d62af597dde751491411685940889958e..373f51f04620b05db60f3e6ecf7765448867b6f5 100644 (file)
@@ -220,8 +220,6 @@ static int stm32_pinctrl_get_pin_muxing(struct udevice *dev,
 
        switch (mode) {
        case GPIOF_UNKNOWN:
-               /* should never happen */
-               return -EINVAL;
        case GPIOF_UNUSED:
                snprintf(buf, size, "%s", pinmux_mode[mode]);
                break;