[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdU6Akz0GC2hooAxn=C2F0WjagPkzRKcH1SJiW0CBeUOaw@mail.gmail.com>
Date: Tue, 29 Jul 2025 12:47:19 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Linus Walleij <linus.walleij@...aro.org>, Bartosz Golaszewski <brgl@...ev.pl>,
Arnd Bergmann <arnd@...db.de>, Alexander Sverdlin <alexander.sverdlin@...il.com>,
kernel test robot <lkp@...el.com>, Peng Fan <peng.fan@....com>,
Koichiro Den <koichiro.den@...onical.com>, Lee Jones <lee@...nel.org>,
Geert Uytterhoeven <geert+renesas@...der.be>, André Draszik <andre.draszik@...aro.org>,
Nikolaos Pasaloukos <nikolaos.pasaloukos@...ize.com>,
Thomas Richard <thomas.richard@...tlin.com>, Yixun Lan <dlan@...too.org>,
Lars-Peter Clausen <lars@...afoo.de>, Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gpiolib: enable CONFIG_GPIOLIB_LEGACY even for !GPIOLIB
Hi Arnd,
On Sat, 26 Jul 2025 at 23:11, Arnd Bergmann <arnd@...nel.org> wrote:
> From: Arnd Bergmann <arnd@...db.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@...el.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@...db.de>
Thanks for your patch, which is now commit a86240a37d43fc22 ("gpiolib:
enable CONFIG_GPIOLIB_LEGACY even for !GPIOLIB") in linus/master
> --- 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
This won't work for everything.
While I now get CONFIG_GPIOLIB_LEGACY=y in all m68k defconfigs, and
simple inline functions like gpio_is_valid() are now available, more
complex functions will still fail, as drivers/gpio/gpiolib-legacy.c
is not built.
drivers/Makefile:
obj-$(CONFIG_GPIOLIB) += gpio/
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists