Skip to contentSkip to conversation

pinctrl: at91: fix CONFIG_OF dependency

PATCH In review Arnd Bergmann 3 participants 3 messages May 2, 2025 – May 5, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: at91: fix CONFIG_OF dependency

From: Arnd Bergmann <[email protected]>

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")
---
 drivers/pinctrl/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pinctrl/Kconfig +2 -1
index db84d80b7e7d..5d368fb66115 100644
@@ -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
Signature · 1 line
2.39.5
#1 lore raw
Quoted 44 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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")
---
 drivers/pinctrl/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pinctrl/Kconfig +2 -2
index db84d80b7e7d..5d368fb66115 100644
@@ -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
--
Quoted 3 lines

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/[email protected]/