diff options
author | Andrei Stefanescu <andrei.stefanescu@oss.nxp.com> | 2024-07-23 16:18:31 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2024-08-05 10:17:43 +0200 |
commit | 522875e09ba5ca59d39040b3536f48540c177636 (patch) | |
tree | a4a7d36a5503b92579f12f554e39c7dfdf7c1135 | |
parent | 846d9b8628a493b2eb38f1eb779a199fae7093dd (diff) |
pinctrl: s32cc: configure PIN_CONFIG_DRIVE_PUSH_PULL
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>
-rw-r--r-- | drivers/pinctrl/nxp/pinctrl-s32cc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pinctrl/nxp/pinctrl-s32cc.c b/drivers/pinctrl/nxp/pinctrl-s32cc.c index fc7e5d34c622..f0430354e832 100644 --- a/drivers/pinctrl/nxp/pinctrl-s32cc.c +++ b/drivers/pinctrl/nxp/pinctrl-s32cc.c @@ -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; |