[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=MeG9fPaq8M8ACq7_9+ysmYX+aRRzZVgApv5YMGtjx72Mw@mail.gmail.com>
Date: Fri, 9 Jan 2026 15:50:53 +0100
From: Bartosz Golaszewski <brgl@...nel.org>
To: Michael Walle <mwalle@...nel.org>
Cc: Kees Cook <kees@...nel.org>, Mika Westerberg <westeri@...nel.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>, Andrew Morton <akpm@...ux-foundation.org>,
Linus Walleij <linus.walleij@...aro.org>, Manivannan Sadhasivam <mani@...nel.org>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Saravana Kannan <saravanak@...gle.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andy Shevchenko <andy@...nel.org>, Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>,
Srinivas Kandagatla <srini@...nel.org>, Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
Alexey Klimov <alexey.klimov@...aro.org>, Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>, linux-hardening@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-sound@...r.kernel.org,
linux-arm-msm@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH v4 00/10] gpio: improve support for shared GPIOs
On Fri, Jan 9, 2026 at 3:41 PM Michael Walle <mwalle@...nel.org> wrote:
>
> > 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.
> >>
> >> 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 enable
>
> Yeah 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).
>
> > 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.
> > 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.
> >
> >> (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
Powered by blists - more mailing lists