linux/drivers/pinctrl/tegra
Prathamesh Shete 8c9652d294 pinctrl: tegra: Set SFIO mode to Mux Register
[ Upstream commit 17013f0acb ]

Tegra devices have an 'sfsel' bit field that determines whether a pin
operates in SFIO (Special Function I/O) or GPIO mode. Currently,
tegra_pinctrl_gpio_disable_free() sets this bit when releasing a GPIO.

However, tegra_pinctrl_set_mux() can be called independently in certain
code paths where gpio_disable_free() is not invoked. In such cases, failing
to set the SFIO mode could lead to incorrect pin configurations, resulting
in functional issues for peripherals relying on SFIO.

This patch ensures that whenever set_mux() is called, the SFIO mode is
correctly set in the Mux Register if the 'sfsel' bit is present. This
prevents situations where the pin remains in GPIO mode despite being
configured for SFIO use.

Fixes: 971dac7123 ("pinctrl: add a driver for NVIDIA Tegra")
Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Link: https://lore.kernel.org/20250306050542.16335-1-pshete@nvidia.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-04-10 14:32:00 +02:00
..
Kconfig This is the bulk of pin control changes for the v5.3 kernel 2019-07-13 15:02:27 -07:00
Makefile pinctrl: tegra: Add Tegra194 pinmux driver 2019-06-01 19:23:06 +02:00
pinctrl-tegra-xusb.c pinctrl: fix several typos 2020-04-28 13:26:49 +02:00
pinctrl-tegra.c pinctrl: tegra: Set SFIO mode to Mux Register 2025-04-10 14:32:00 +02:00
pinctrl-tegra.h pinctrl: tegra: Add SFIO/GPIO programming on Tegra194 2020-03-27 11:46:06 +01:00
pinctrl-tegra20.c This is the bulk of pin control changes for the v5.3 kernel 2019-07-13 15:02:27 -07:00
pinctrl-tegra30.c This is the bulk of pin control changes for the v5.3 kernel 2019-07-13 15:02:27 -07:00
pinctrl-tegra114.c This is the bulk of pin control changes for the v5.3 kernel 2019-07-13 15:02:27 -07:00
pinctrl-tegra124.c This is the bulk of pin control changes for the v5.3 kernel 2019-07-13 15:02:27 -07:00
pinctrl-tegra194.c pinctrl: tegra: pinctrl-tegra194: Do not initialise field twice 2020-07-16 15:58:12 +02:00
pinctrl-tegra210.c pinctrl: tegra210: Add Tegra210 pinctrl pm ops 2019-08-05 11:21:28 +02:00