* [PATCH 1/3] ARM: stm32: select HAVE_SHARED_GPIOS
2026-11-03 13:33 [PATCH 0/3] drm/panel-mipi-dbi: stop requesting GPIOs explicitly as non-exclusive Bartosz Golaszewski
@ 2026-11-03 13:33 ` Bartosz Golaszewski
2026-12-04 15:09 ` Antonio Borneo
2026-11-03 13:33 ` [PATCH 2/3] ARM: sunxi: " Bartosz Golaszewski
2026-11-03 13:33 ` [PATCH 3/3] drm/panel-mipi-dbi: drop GPIOD_FLAGS_BIT_NONEXCLUSIVE Bartosz Golaszewski
2 siblings, 1 reply; 6+ messages in thread
From: Bartosz Golaszewski @ 2026-11-03 13:33 UTC (permalink / raw)
To: Russell King, Maxime Coquelin, Alexandre Torgue, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Bartosz Golaszewski
Cc: linux-arm-kernel, linux-stm32, linux-kernel, linux-sunxi,
dri-devel, linux-gpio, Bartosz Golaszewski
Enable automated management of shared GPIOs provided by the GPIO shared
proxy module for stm32 platforms.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
arch/arm/mach-stm32/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig
index 4ac3384e397aabd86e4843d6a6326cd22a2dd66e..ecb6b35610f4988b4fca3fa10defc260a149f7c1 100644
--- a/arch/arm/mach-stm32/Kconfig
+++ b/arch/arm/mach-stm32/Kconfig
@@ -9,6 +9,7 @@ menuconfig ARCH_STM32
select ARM_AMBA
select ARCH_HAS_RESET_CONTROLLER
select CLKSRC_STM32
+ select HAVE_SHARED_GPIOS
select PINCTRL
select RESET_CONTROLLER
select STM32_EXTI if ARM_SINGLE_ARMV7M
--
2.47.3
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] ARM: stm32: select HAVE_SHARED_GPIOS
2026-11-03 13:33 ` [PATCH 1/3] ARM: stm32: select HAVE_SHARED_GPIOS Bartosz Golaszewski
@ 2026-12-04 15:09 ` Antonio Borneo
0 siblings, 0 replies; 6+ messages in thread
From: Antonio Borneo @ 2026-12-04 15:09 UTC (permalink / raw)
To: Bartosz Golaszewski, Russell King, Maxime Coquelin,
Alexandre Torgue, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Linus Walleij, Bartosz Golaszewski,
Leonard Göhrs, Chris Morgan
Cc: linux-arm-kernel, linux-stm32, linux-kernel, linux-sunxi,
dri-devel, linux-gpio
On Tue, 2026-11-03 at 14:33 +0100, Bartosz Golaszewski wrote:
> Enable automated management of shared GPIOs provided by the GPIO shared
> proxy module for stm32 platforms.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
> ---
> arch/arm/mach-stm32/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig
> index 4ac3384e397aabd86e4843d6a6326cd22a2dd66e..ecb6b35610f4988b4fca3fa10defc260a149f7c1 100644
> --- a/arch/arm/mach-stm32/Kconfig
> +++ b/arch/arm/mach-stm32/Kconfig
> @@ -9,6 +9,7 @@ menuconfig ARCH_STM32
> select ARM_AMBA
> select ARCH_HAS_RESET_CONTROLLER
> select CLKSRC_STM32
> + select HAVE_SHARED_GPIOS
> select PINCTRL
> select RESET_CONTROLLER
> select STM32_EXTI if ARM_SINGLE_ARMV7M
>
Hi Bartosz,
ARCH_STM32 is enabled by default in multi_v7_defconfig and in the deprecated
stm32_defconfig.
ARCH_SUNXI is enabled by default in multi_v7_defconfig, multi_v5_defconfig
and sunxi_defconfig.
My concern is about all the other platforms that use these defconfig and
will then embed the extra shared gpio code, while not using it.
The driver "panel-mipi-dbi" has the feature to share "dc-gpio", but none of
the upstream DT needs nor uses it.
Looking for the compatible "panel-mipi-dbi-spi", I see that:
- arch/arm/boot/dts/allwinner/sun8i-v3s-anbernic-rg-nano.dts
dc-gpios = <&pio 2 0 GPIO_ACTIVE_HIGH>;
has no other references to "pio 2 0"
- arch/arm/boot/dts/st/stm32mp153c-lxa-fairytux2.dtsi and
arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi get included by board DTs:
- stm32mp153c-lxa-fairytux2-gen1.dts
- stm32mp153c-lxa-fairytux2-gen2.dts
- stm32mp153c-lxa-tac-gen3.dts
- stm32mp157c-lxa-tac-gen1.dts
- stm32mp157c-lxa-tac-gen2.dts
all using the same GPIO:
dc-gpios = <&gpiod 10 0>;
and none has other references to "gpiod 10".
My conclusion is that neither STM32 nor SUNXI arch need HAVE_SHARED_GPIOS,
at least not on current upstream DTs.
I have added in copy Leonard Göhrs and Chris Morgan, the developers that
added the panel's node in the above DTs, to get their feedback.
Patch 3/3 could be merged independently, dropping 1/3 and 2/3.
Best Regards,
Antonio
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/3] ARM: sunxi: select HAVE_SHARED_GPIOS
2026-11-03 13:33 [PATCH 0/3] drm/panel-mipi-dbi: stop requesting GPIOs explicitly as non-exclusive Bartosz Golaszewski
2026-11-03 13:33 ` [PATCH 1/3] ARM: stm32: select HAVE_SHARED_GPIOS Bartosz Golaszewski
@ 2026-11-03 13:33 ` Bartosz Golaszewski
2026-11-03 13:33 ` [PATCH 3/3] drm/panel-mipi-dbi: drop GPIOD_FLAGS_BIT_NONEXCLUSIVE Bartosz Golaszewski
2 siblings, 0 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2026-11-03 13:33 UTC (permalink / raw)
To: Russell King, Maxime Coquelin, Alexandre Torgue, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Bartosz Golaszewski
Cc: linux-arm-kernel, linux-stm32, linux-kernel, linux-sunxi,
dri-devel, linux-gpio, Bartosz Golaszewski
Enable automated management of shared GPIOs provided by the GPIO shared
proxy module for sunxi platforms.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
arch/arm/mach-sunxi/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index e015f2497111a42133ddd4e7ddd172eda06d90ba..b62e8518e270459444e7d4ee382ef753c368dd51 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -5,6 +5,7 @@ menuconfig ARCH_SUNXI
select ARCH_HAS_RESET_CONTROLLER
select CLKSRC_MMIO
select GPIOLIB
+ select HAVE_SHARED_GPIOS
select PINCTRL
select PM_OPP
select SUN4I_TIMER
--
2.47.3
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/3] drm/panel-mipi-dbi: drop GPIOD_FLAGS_BIT_NONEXCLUSIVE
2026-11-03 13:33 [PATCH 0/3] drm/panel-mipi-dbi: stop requesting GPIOs explicitly as non-exclusive Bartosz Golaszewski
2026-11-03 13:33 ` [PATCH 1/3] ARM: stm32: select HAVE_SHARED_GPIOS Bartosz Golaszewski
2026-11-03 13:33 ` [PATCH 2/3] ARM: sunxi: " Bartosz Golaszewski
@ 2026-11-03 13:33 ` Bartosz Golaszewski
2026-12-04 15:10 ` Antonio Borneo
2 siblings, 1 reply; 6+ messages in thread
From: Bartosz Golaszewski @ 2026-11-03 13:33 UTC (permalink / raw)
To: Russell King, Maxime Coquelin, Alexandre Torgue, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Linus Walleij,
Bartosz Golaszewski
Cc: linux-arm-kernel, linux-stm32, linux-kernel, linux-sunxi,
dri-devel, linux-gpio, Bartosz Golaszewski
GPIOD_FLAGS_BIT_NONEXCLUSIVE is deprecated and will be removed. The
preferred way of sharing of GPIO pins is relying on the GPIO shared
proxy provided by GPIOLIB. There are only two users of this driver in
upstream DT sources and both now select HAVE_SHARED_GPIOS so we can
safely drop the non-exclusive acquisition of dc-gpios.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
drivers/gpu/drm/tiny/panel-mipi-dbi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/tiny/panel-mipi-dbi.c b/drivers/gpu/drm/tiny/panel-mipi-dbi.c
index 60cd65cae41d8d4f4f6e5fbc57d5d34058ca4d38..6f09b723cd7c352b0a1ea9f11a2e58052978cf0d 100644
--- a/drivers/gpu/drm/tiny/panel-mipi-dbi.c
+++ b/drivers/gpu/drm/tiny/panel-mipi-dbi.c
@@ -418,8 +418,7 @@ static int panel_mipi_dbi_spi_probe(struct spi_device *spi)
if (IS_ERR(dbi->reset))
return dev_err_probe(dev, PTR_ERR(dbi->reset), "Failed to get GPIO 'reset'\n");
- /* Multiple panels can share the "dc" GPIO, but only if they are on the same SPI bus! */
- dc = devm_gpiod_get_optional(dev, "dc", GPIOD_OUT_LOW | GPIOD_FLAGS_BIT_NONEXCLUSIVE);
+ dc = devm_gpiod_get_optional(dev, "dc", GPIOD_OUT_LOW);
if (IS_ERR(dc))
return dev_err_probe(dev, PTR_ERR(dc), "Failed to get GPIO 'dc'\n");
--
2.47.3
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3] drm/panel-mipi-dbi: drop GPIOD_FLAGS_BIT_NONEXCLUSIVE
2026-11-03 13:33 ` [PATCH 3/3] drm/panel-mipi-dbi: drop GPIOD_FLAGS_BIT_NONEXCLUSIVE Bartosz Golaszewski
@ 2026-12-04 15:10 ` Antonio Borneo
0 siblings, 0 replies; 6+ messages in thread
From: Antonio Borneo @ 2026-12-04 15:10 UTC (permalink / raw)
To: Bartosz Golaszewski, Russell King, Maxime Coquelin,
Alexandre Torgue, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Linus Walleij, Bartosz Golaszewski
Cc: linux-arm-kernel, linux-stm32, linux-kernel, linux-sunxi,
dri-devel, linux-gpio
On Tue, 2026-11-03 at 14:33 +0100, Bartosz Golaszewski wrote:
> GPIOD_FLAGS_BIT_NONEXCLUSIVE is deprecated and will be removed. The
> preferred way of sharing of GPIO pins is relying on the GPIO shared
> proxy provided by GPIOLIB. There are only two users of this driver in
> upstream DT sources and both now select HAVE_SHARED_GPIOS so we can
> safely drop the non-exclusive acquisition of dc-gpios.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
> ---
> drivers/gpu/drm/tiny/panel-mipi-dbi.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/tiny/panel-mipi-dbi.c b/drivers/gpu/drm/tiny/panel-mipi-dbi.c
> index 60cd65cae41d8d4f4f6e5fbc57d5d34058ca4d38..6f09b723cd7c352b0a1ea9f11a2e58052978cf0d 100644
> --- a/drivers/gpu/drm/tiny/panel-mipi-dbi.c
> +++ b/drivers/gpu/drm/tiny/panel-mipi-dbi.c
> @@ -418,8 +418,7 @@ static int panel_mipi_dbi_spi_probe(struct spi_device *spi)
> if (IS_ERR(dbi->reset))
> return dev_err_probe(dev, PTR_ERR(dbi->reset), "Failed to get GPIO 'reset'\n");
>
> - /* Multiple panels can share the "dc" GPIO, but only if they are on the same SPI bus! */
> - dc = devm_gpiod_get_optional(dev, "dc", GPIOD_OUT_LOW | GPIOD_FLAGS_BIT_NONEXCLUSIVE);
> + dc = devm_gpiod_get_optional(dev, "dc", GPIOD_OUT_LOW);
> if (IS_ERR(dc))
> return dev_err_probe(dev, PTR_ERR(dc), "Failed to get GPIO 'dc'\n");
>
>
Reviewed-by: Antonio Borneo <antonio.borneo@foss.st.com>
Thanks,
Antonio
^ permalink raw reply [flat|nested] 6+ messages in thread