public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: at91: fix CONFIG_OF dependency
@ 2025-05-02 20:35 Arnd Bergmann
  2025-05-05  6:50 ` Bartosz Golaszewski
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2025-05-02 20:35 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Arnd Bergmann, linux-gpio, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Selecting OF_GPIO is not allowed when CONFIG_OF is disabled:

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

WARNING: unmet direct dependencies detected for MFD_STMFX
  Depends on [n]: HAS_IOMEM [=y] && I2C [=y] && OF [=n]
  Selected by [y]:
  - PINCTRL_STMFX [=y] && PINCTRL [=y] && I2C [=y] && OF_GPIO [=y]

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

Add back the unconditional CONFIG_OF dependency, but leave COMPILE_TEST
as an option when that is enabled.

Fixes: 8e86af65f39d ("pinctrl: at91: allow building the module with COMPILE_TEST=y")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/pinctrl/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index db84d80b7e7d..5d368fb66115 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -103,7 +103,8 @@ config PINCTRL_AS3722
 
 config PINCTRL_AT91
 	bool "AT91 pinctrl driver"
-	depends on (OF && ARCH_AT91) || COMPILE_TEST
+	depends on ARCH_AT91 || COMPILE_TEST
+	depends on OF
 	select PINMUX
 	select PINCONF
 	select GPIOLIB
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl: at91: fix CONFIG_OF dependency
  2025-05-02 20:35 [PATCH] pinctrl: at91: fix CONFIG_OF dependency Arnd Bergmann
@ 2025-05-05  6:50 ` Bartosz Golaszewski
  2025-05-05  6:59   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Bartosz Golaszewski @ 2025-05-05  6:50 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linus Walleij, Bartosz Golaszewski, Arnd Bergmann, linux-gpio,
	linux-kernel

On Fri, May 2, 2025 at 10:36 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> Selecting OF_GPIO is not allowed when CONFIG_OF is disabled:
>
> WARNING: unmet direct dependencies detected for OF_GPIO
>   Depends on [n]: GPIOLIB [=y] && OF [=n] && HAS_IOMEM [=y]
>   Selected by [y]:
>   - PINCTRL_AT91 [=y] && PINCTRL [=y] && (OF [=n] && ARCH_AT91 || COMPILE_TEST [=y])
>
> WARNING: unmet direct dependencies detected for MFD_STMFX
>   Depends on [n]: HAS_IOMEM [=y] && I2C [=y] && OF [=n]
>   Selected by [y]:
>   - PINCTRL_STMFX [=y] && PINCTRL [=y] && I2C [=y] && OF_GPIO [=y]
>
> WARNING: unmet direct dependencies detected for GPIO_SYSCON
>   Depends on [n]: GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON [=y] && OF [=n]
>   Selected by [y]:
>   - GPIO_SAMA5D2_PIOBU [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON [=y] && OF_GPIO [=y] && (ARCH_AT91 || COMPILE_TEST [=y])
>
> Add back the unconditional CONFIG_OF dependency, but leave COMPILE_TEST
> as an option when that is enabled.
>
> Fixes: 8e86af65f39d ("pinctrl: at91: allow building the module with COMPILE_TEST=y")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/pinctrl/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
> index db84d80b7e7d..5d368fb66115 100644
> --- a/drivers/pinctrl/Kconfig
> +++ b/drivers/pinctrl/Kconfig
> @@ -103,7 +103,8 @@ config PINCTRL_AS3722
>
>  config PINCTRL_AT91
>         bool "AT91 pinctrl driver"
> -       depends on (OF && ARCH_AT91) || COMPILE_TEST
> +       depends on ARCH_AT91 || COMPILE_TEST
> +       depends on OF
>         select PINMUX
>         select PINCONF
>         select GPIOLIB
> --
> 2.39.5
>
>

Hi!

I sent an alternative patch[1] which simply removes the OF_GPIO
selection as this driver doesn't really need it at build-time.

Bart

[1] https://lore.kernel.org/all/20250502100841.113091-1-brgl@bgdev.pl/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl: at91: fix CONFIG_OF dependency
  2025-05-05  6:50 ` Bartosz Golaszewski
@ 2025-05-05  6:59   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2025-05-05  6:59 UTC (permalink / raw)
  To: Bartosz Golaszewski, Arnd Bergmann
  Cc: Linus Walleij, Bartosz Golaszewski, open list:GPIO SUBSYSTEM,
	linux-kernel

On Mon, May 5, 2025, at 08:50, Bartosz Golaszewski wrote:
> On Fri, May 2, 2025 at 10:36 PM Arnd Bergmann <arnd@kernel.org> wrote:

>
> I sent an alternative patch[1] which simply removes the OF_GPIO
> selection as this driver doesn't really need it at build-time.
>
> [1] https://lore.kernel.org/all/20250502100841.113091-1-brgl@bgdev.pl/

Ok, thanks. If there is no build dependency, then that is indeed
the better fix.

     Arnd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-05  6:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-02 20:35 [PATCH] pinctrl: at91: fix CONFIG_OF dependency Arnd Bergmann
2025-05-05  6:50 ` Bartosz Golaszewski
2025-05-05  6:59   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox