[PATCH] gpio: tb10x: fix OF_GPIO dependency

Arnd Bergmann posted 1 patch 2 weeks, 1 day ago
There is a newer version of this series
drivers/gpio/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] gpio: tb10x: fix OF_GPIO dependency
Posted by Arnd Bergmann 2 weeks, 1 day ago
From: Arnd Bergmann <arnd@arndb.de>

Selecting OF_GPIO is generally not allowed, it always gets enabled
when both GPIOLIB and OF are turned on.

The tb10x driver now warns about this after it was enabled for
compile-testing:

WARNING: unmet direct dependencies detected for OF_GPIO
  Depends on [n]: GPIOLIB [=y] && OF [=n] && HAS_IOMEM [=y]
  Selected by [y]:
  - GPIO_TB10X [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && (ARC_PLAT_TB10X || COMPILE_TEST [=y])

Use the usual 'depends on' here.

Fixes: 682fbb18e14c ("gpio: tb10x: allow building the module with COMPILE_TEST=y")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpio/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 0fed90ef587a..a1fd130a2408 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -735,9 +735,9 @@ config GPIO_TANGIER
 config GPIO_TB10X
 	bool "Abilis Systems TB10x GPIO controller"
 	depends on ARC_PLAT_TB10X || COMPILE_TEST
+	depends on OF_GPIO
 	select GPIO_GENERIC
 	select GENERIC_IRQ_CHIP
-	select OF_GPIO
 
 config GPIO_TEGRA
 	tristate "NVIDIA Tegra GPIO support"
-- 
2.39.5
Re: [PATCH] gpio: tb10x: fix OF_GPIO dependency
Posted by Bartosz Golaszewski 2 weeks ago
On Thu, Dec 4, 2025 at 10:50 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> Selecting OF_GPIO is generally not allowed, it always gets enabled
> when both GPIOLIB and OF are turned on.
>
> The tb10x driver now warns about this after it was enabled for
> compile-testing:
>
> WARNING: unmet direct dependencies detected for OF_GPIO
>   Depends on [n]: GPIOLIB [=y] && OF [=n] && HAS_IOMEM [=y]
>   Selected by [y]:
>   - GPIO_TB10X [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && (ARC_PLAT_TB10X || COMPILE_TEST [=y])
>
> Use the usual 'depends on' here.
>
> Fixes: 682fbb18e14c ("gpio: tb10x: allow building the module with COMPILE_TEST=y")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Hi Arnd!

Actually a better fix is to simply drop this select and not introduce
the depends on. This driver doesn't call any symbols from gpiolib-of.h
and even then - they provide stubs. This also limits the COMPILE_TEST
coverage to systems with OF_GPIO selected.

Same for the other patch you sent.

Bart