Re: [PATCH v4 00/10] gpio: improve support for shared GPIOs
From: Bartosz Golaszewski <brgl@kernel.org>
Date: 2026-01-09 14:51:09
Also in:
linux-arm-msm, linux-gpio, linux-hardening, linux-sound, lkml
On Fri, Jan 9, 2026 at 3:41 PM Michael Walle [off-list ref] wrote:
quoted
I am aware of the issue where false-positive shared GPIOs are detected, I posted a fix for that too. Without logs, I can't really tell if that's the case for you though. :(What I mean is, GPIO_SHARED is automatically selected by ARCH_QCOM (and probably others in the future). But GPIO_SHARED_PROXY is selectable by the user and it can be deselected. But you cannot specifically deactivate GPIO_SHARED. So there is no way to go back to the former hacky shared gpio handling; which might be intended :) If so, shouldn't be GPIO_SHARED_PROXY be either y or m if GPIO_SHARED=y ? I.e. don't allow it to be deselected.
Fair point. I'll send a patch.
quoted
quoted
This broke my board (using the arm64 defconfig, works without GPIO_SHARED of course). I'm seeing two issues here with my board (arch/arm64/boot/dts/ti/k3-am67a-kontron-sa67*): (1) It's GPIO controller (gpio-davinci) doesn't support .get_direction so I'm getting ENOTSUPP during probing of the (some?) shared GPIOs.Unless this board really shares GPIOs, it may be due to the false-positives that will be fixed by this patch[1]. If you enableYeah this board shares an enable GPIO for two regulators (regulator-5 and regulator-6, arch/arm64/boot/dts/ti/k3-am67a-kontron-sa67-base.dts).quoted
CONFIG_DEBUG_GPIO and post the kernel log, I'll be able to tell for sure.See end of this mail. I've applied the mentioned patch.
Yes, I see there are indeed shared pins.
quoted
Though thanks for bringing this to my attention as I now see there is indeed an issue when the proxied chip doesn't support .get_direction() as well as a duplicated check in GPIO core. I'll fix it too.quoted
(2) GPIO_SHARED_PROXY is default m in the defconfig, but I need the pins for the root filesystem medium, i.e. the SD card regulators.I'll take care of this is you confirm, the issue persists even with patch[1].Not sure this is still valid. Because I've just learned that apparently, the arm64 Image shall be made smaller and thus "need a driver for rootfs" isn't a valid reason for =y anymore.
Is a switch to disable shared GPIO management entirely via Kconfig (depending on CONFIG_EXPERT) good enough for you? Bart