From: "Michael Walle" <mwalle@kernel.org>
To: "Bartosz Golaszewski" <brgl@bgdev.pl>,
"Kees Cook" <kees@kernel.org>,
"Mika Westerberg" <westeri@kernel.org>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Saravana Kannan" <saravanak@google.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Andy Shevchenko" <andy@kernel.org>,
"Catalin Marinas" <catalin.marinas@arm.com>,
"Will Deacon" <will@kernel.org>,
"Srinivas Kandagatla" <srini@kernel.org>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Alexey Klimov" <alexey.klimov@linaro.org>,
"Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konradybcio@kernel.org>
Cc: <linux-hardening@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-gpio@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-sound@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>,
"Bartosz Golaszewski" <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH v4 00/10] gpio: improve support for shared GPIOs
Date: Thu, 08 Jan 2026 15:46:36 +0100 [thread overview]
Message-ID: <DFJAFK3DTBOZ.3G2P3A5IH34GF@kernel.org> (raw)
In-Reply-To: <20251112-gpio-shared-v4-0-b51f97b1abd8@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 3647 bytes --]
Hi Bartosz,
On Wed Nov 12, 2025 at 2:55 PM CET, Bartosz Golaszewski wrote:
> Bjorn, Konrad: I should have Cc'ed you on v1 but I just went with what
> came out of b4 --auto-to-cc. It only gave me arm-msm. :( Patch 7 from
> this series however impacts Qualcomm platforms. It's a runtime dependency
> of patches 8 and 9. Would you mind Acking it so that I can take it into
> an immutable branch that I'll make available to Mark Brown for him to
> take patches 8-10 through the ASoC and regulator trees for v6.19?
>
> Problem statement: GPIOs are implemented as a strictly exclusive
> resource in the kernel but there are lots of platforms on which single
> pin is shared by multiple devices which don't communicate so need some
> way of properly sharing access to a GPIO. What we have now is the
> GPIOD_FLAGS_BIT_NONEXCLUSIVE flag which was introduced as a hack and
> doesn't do any locking or arbitration of access - it literally just hand
> the same GPIO descriptor to all interested users.
>
> The proposed solution is composed of three major parts: the high-level,
> shared GPIO proxy driver that arbitrates access to the shared pin and
> exposes a regular GPIO chip interface to consumers, a low-level shared
> GPIOLIB module that scans firmware nodes and creates auxiliary devices
> that attach to the proxy driver and finally a set of core GPIOLIB
> changes that plug the former into the GPIO lookup path.
>
> The changes are implemented in a way that allows to seamlessly compile
> out any code related to sharing GPIOs for systems that don't need it.
The problem here is that the aarch64 defconfig has ARCH_QCOM enabled
and thus it will get enabled for any platforms, right?
I haven't grokked everything, but does GPIO_SHARED=y makes any sense
without GPIO_SHARED_PROXY? It seems to me that the probing of shared
pins will be deferred indefinitely.
> The practical use-case for this are the powerdown GPIOs shared by
> speakers on Qualcomm db845c platform, however I have also extensively
> tested it using gpio-virtuser on arm64 qemu with various DT
> configurations.
>
> I'm Cc'ing some people that may help with reviewing/be interested in
> this: OF maintainers (because the main target are OF systems initially),
> Mark Brown because most users of GPIOD_FLAGS_BIT_NONEXCLUSIVE live
> in audio or regulator drivers and one of the goals of this series is
> dropping the hand-crafted GPIO enable counting via struct
> regulator_enable_gpio in regulator core), Andy and Mika because I'd like
> to also cover ACPI (even though I don't know about any ACPI platform that
> would need this at the moment, I think it makes sense to make the
> solution complete), Dmitry (same thing but for software nodes), Mani
> (because you have a somewhat related use-case for the PERST# signal and
> I'd like to hear your input on whether this is something you can use or
> maybe it needs a separate, implicit gpio-perst driver similar to what
> Krzysztof did for reset-gpios) and Greg (because I mentioned this to you
> last week in person and I also use the auxiliary bus for the proxy
> devices).
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.
(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.
-michael
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]
next prev parent reply other threads:[~2026-01-08 14:46 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-12 13:55 [PATCH v4 00/10] gpio: improve support for shared GPIOs Bartosz Golaszewski
2025-11-12 13:55 ` [PATCH v4 01/10] string: provide strends() Bartosz Golaszewski
2025-11-17 20:33 ` Kees Cook
2025-11-18 9:47 ` Bartosz Golaszewski
2025-11-18 10:13 ` Andy Shevchenko
2025-11-12 13:55 ` [PATCH v4 02/10] gpiolib: define GPIOD_FLAG_SHARED Bartosz Golaszewski
2025-11-12 13:55 ` [PATCH v4 03/10] gpiolib: implement low-level, shared GPIO support Bartosz Golaszewski
2025-11-26 15:34 ` Cosmin Tanislav
2025-11-26 15:47 ` Bartosz Golaszewski
2026-03-11 18:38 ` Jon Hunter
2026-03-11 20:14 ` Andy Shevchenko
2026-03-12 7:28 ` Jon Hunter
2026-03-12 7:49 ` Chen-Yu Tsai
2026-03-12 8:41 ` Jon Hunter
2026-03-12 9:28 ` Andy Shevchenko
2026-03-13 14:18 ` Bartosz Golaszewski
2025-11-12 13:55 ` [PATCH v4 04/10] gpio: shared-proxy: implement the shared GPIO proxy driver Bartosz Golaszewski
2025-11-12 13:55 ` [PATCH v4 05/10] gpiolib: support shared GPIOs in core subsystem code Bartosz Golaszewski
2025-11-12 13:55 ` [PATCH v4 06/10] gpio: provide gpiod_is_shared() Bartosz Golaszewski
2025-11-12 13:55 ` [PATCH v4 07/10] arm64: select HAVE_SHARED_GPIOS for ARCH_QCOM Bartosz Golaszewski
2025-11-13 8:51 ` Arnd Bergmann
2025-11-14 19:40 ` Bjorn Andersson
2025-11-18 14:06 ` Mark Brown
2025-11-18 14:13 ` Bartosz Golaszewski
2025-11-18 14:20 ` Mark Brown
2025-11-18 14:27 ` Bartosz Golaszewski
2025-11-18 19:46 ` Mark Brown
2025-11-26 14:24 ` Jon Hunter
2025-11-26 14:28 ` Bartosz Golaszewski
2025-11-26 14:51 ` Jon Hunter
2025-11-26 14:54 ` Bartosz Golaszewski
2025-11-26 14:55 ` Jon Hunter
2025-11-26 15:05 ` Bartosz Golaszewski
2025-11-26 15:29 ` Jon Hunter
2025-11-26 15:33 ` Bartosz Golaszewski
2025-11-26 15:47 ` Jon Hunter
2025-11-26 16:00 ` Bartosz Golaszewski
2026-01-07 11:06 ` Pankaj Patil
2026-01-07 12:38 ` Bartosz Golaszewski
2026-01-08 6:49 ` Pankaj Patil
2026-01-08 8:45 ` Bartosz Golaszewski
2026-01-08 9:43 ` Pankaj Patil
2026-01-08 10:52 ` Bartosz Golaszewski
2026-01-08 14:37 ` Bartosz Golaszewski
2025-11-12 13:55 ` [PATCH v4 08/10] ASoC: wsa881x: drop GPIOD_FLAGS_BIT_NONEXCLUSIVE flag from GPIO lookup Bartosz Golaszewski
2025-11-12 13:55 ` [PATCH v4 09/10] ASoC: wsa883x: " Bartosz Golaszewski
2025-11-12 13:55 ` [PATCH v4 10/10] regulator: make the subsystem aware of shared GPIOs Bartosz Golaszewski
2025-11-17 9:20 ` (subset) [PATCH v4 00/10] gpio: improve support for " Bartosz Golaszewski
2025-11-18 11:15 ` Geert Uytterhoeven
2025-11-18 11:55 ` Bartosz Golaszewski
2025-11-18 12:55 ` Geert Uytterhoeven
2025-11-18 13:21 ` Bartosz Golaszewski
2025-11-18 23:23 ` Linus Walleij
2025-11-19 8:01 ` Andy Shevchenko
2025-11-19 8:33 ` Geert Uytterhoeven
2025-11-19 14:29 ` Linus Walleij
2025-11-20 10:39 ` (subset) " Mark Brown
2025-11-20 13:36 ` Mark Brown
2025-11-21 0:27 ` Val Packett
2025-11-21 9:03 ` Bartosz Golaszewski
2025-11-21 10:20 ` Krzysztof Kozlowski
2025-11-26 16:27 ` Dmitry Baryshkov
2025-11-26 16:49 ` Bartosz Golaszewski
2026-01-07 11:47 ` Manivannan Sadhasivam
2026-01-07 12:12 ` Dmitry Baryshkov
2026-01-07 12:23 ` Manivannan Sadhasivam
2026-01-08 14:46 ` Michael Walle [this message]
2026-01-08 15:50 ` Bartosz Golaszewski
2026-01-09 14:41 ` Michael Walle
2026-01-09 14:50 ` Bartosz Golaszewski
2026-01-09 15:08 ` Michael Walle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DFJAFK3DTBOZ.3G2P3A5IH34GF@kernel.org \
--to=mwalle@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=alexey.klimov@linaro.org \
--cc=andersson@kernel.org \
--cc=andy@kernel.org \
--cc=bartosz.golaszewski@linaro.org \
--cc=brgl@bgdev.pl \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=conor+dt@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kees@kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=mani@kernel.org \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=saravanak@google.com \
--cc=srini@kernel.org \
--cc=tiwai@suse.com \
--cc=westeri@kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.