linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpiolib: enable CONFIG_GPIOLIB_LEGACY even for !GPIOLIB
@ 2025-07-26 21:10 Arnd Bergmann
  2025-07-27  8:27 ` Bartosz Golaszewski
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Arnd Bergmann @ 2025-07-26 21:10 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Arnd Bergmann,
	Alexander Sverdlin
  Cc: kernel test robot, Peng Fan, Koichiro Den, Lee Jones,
	Geert Uytterhoeven, André Draszik, Nikolaos Pasaloukos,
	Thomas Richard, Yixun Lan, Lars-Peter Clausen, Andy Shevchenko,
	linux-gpio, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

A few drivers that use the legacy GPIOLIB interfaces can be enabled
even when GPIOLIB is disabled entirely. With my previous patch this
now causes build failures like:

   drivers/nfc/s3fwrn5/uart.c: In function 's3fwrn82_uart_parse_dt':
        drivers/nfc/s3fwrn5/uart.c:100:14: error: implicit declaration of function 'gpio_is_valid'; did you mean 'uuid_is_valid'? [-Werror=implicit-function-declaration]

These did not show up in my randconfig tests because randconfig almost
always has GPIOLIB selected by some other driver, and I did most
of the testing with follow-up patches that address the failures
properly.

Move the symbol outside of the 'if CONFIG_GPIOLIB' block for the moment
to avoid the build failures. It can be moved back and turned off by
default once all the driver specific changes are merged.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202507261934.yIHeUuEQ-lkp@intel.com/
Fixes: 678bae2eaa81 ("gpiolib: make legacy interfaces optional")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpio/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 8bda3c9d47b4..c48f9badb513 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -12,11 +12,11 @@ menuconfig GPIOLIB
 
 	  If unsure, say N.
 
-if GPIOLIB
-
 config GPIOLIB_LEGACY
 	def_bool y
 
+if GPIOLIB
+
 config GPIOLIB_FASTPATH_LIMIT
 	int "Maximum number of GPIOs for fast path"
 	range 32 512
-- 
2.39.5


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

end of thread, other threads:[~2025-09-01 11:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-26 21:10 [PATCH] gpiolib: enable CONFIG_GPIOLIB_LEGACY even for !GPIOLIB Arnd Bergmann
2025-07-27  8:27 ` Bartosz Golaszewski
2025-07-29 10:47 ` Geert Uytterhoeven
2025-07-29 11:57   ` Arnd Bergmann
2025-07-29 12:12     ` Geert Uytterhoeven
2025-07-29 14:11       ` Arnd Bergmann
2025-08-13 22:26 ` Rob Herring
2025-09-01 11:44   ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).