pinctrl: s32cc: configure PIN_CONFIG_DRIVE_PUSH_PULL
authorAndrei Stefanescu <andrei.stefanescu@oss.nxp.com>
Tue, 23 Jul 2024 13:18:31 +0000 (16:18 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 5 Aug 2024 08:17:43 +0000 (10:17 +0200)
Previously, it was possible to only configure the open-drain for a pin.
However, after a pin got configured with open-drain, there wasn't any
way to disable it. Add the push-pull configuration in order to reverse
the open-drain configuration.

Signed-off-by: Florin Buica <florin.buica@nxp.com>
Signed-off-by: Andrei Stefanescu <andrei.stefanescu@oss.nxp.com>
Link: https://lore.kernel.org/20240723131832.1171036-3-andrei.stefanescu@oss.nxp.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/nxp/pinctrl-s32cc.c

index fc7e5d34c6227cf938f837e22335f2a565190ca7..f0430354e8321f56081c3dd8d8bb673d0ce7bc14 100644 (file)
@@ -510,6 +510,10 @@ static int s32_parse_pincfg(unsigned long pincfg, unsigned int *mask,
                *config |= S32_MSCR_ODE;
                *mask |= S32_MSCR_ODE;
                break;
+       case PIN_CONFIG_DRIVE_PUSH_PULL:
+               *config &= ~S32_MSCR_ODE;
+               *mask |= S32_MSCR_ODE;
+               break;
        case PIN_CONFIG_OUTPUT_ENABLE:
                if (arg)
                        *config |= S32_MSCR_OBE;