[PATCH v3 04/10] gpio: shared-proxy: implement the shared GPIO proxy driver
Linus Walleij
linus.walleij at linaro.org
Tue Nov 11 02:43:07 PST 2025
On Wed, Oct 29, 2025 at 12:21 PM Bartosz Golaszewski <brgl at bgdev.pl> wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
>
> Add a virtual GPIO proxy driver which arbitrates access to a single
> shared GPIO by multiple users. It works together with the core shared
> GPIO support from GPIOLIB and functions by acquiring a reference to a
> shared GPIO descriptor exposed by gpiolib-shared and making sure that
> the state of the GPIO stays consistent.
>
> In general: if there's only one user at the moment: allow it to do
> anything as if this was a normal GPIO (in essence: just propagate calls
> to the underlying real hardware driver). If there are more users: don't
> allow to change the direction set by the initial user, allow to change
> configuration options but warn about possible conflicts and finally:
> treat the output-high value as a reference counted, logical "GPIO
> enabled" setting, meaning: the GPIO value is set to high when the first
> user requests it to be high and back to low once the last user stops
> "voting" for high.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
With same reasoning as for 3/10:
Reviewed-by: Linus Walleij <linus.walleij at linaro.org>
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list