Re: [PATCH 6/6] [v6] gpiolib: turn off legacy interface by default

[email protected] Fri, 10 Jul 2026 21:35:38 +0000
Newsgroups org.kernel.vger.linux-leds,org.kernel.vger.linux-input
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Drivers MFD_AAT2870_CORE, MFD_SI476X_CORE, and SND_SOC_TLV320DAC33 become silently unselectable on standard kernels because they still use `depends on GPIOLIB_LEGACY`.
--

--- Patch [6]: [PATCH 6/6] [v6] gpiolib: turn off legacy interface by default ---
commit c81360523a83f6de8b9f91867c27fb9f36e0da52
Author: Arnd Bergmann <[email protected]>

gpiolib: turn off legacy interface by default

This commit turns off the legacy GPIO interface by default, allowing it to
be enabled manually only for compile testing. It relies on the assumption
that all legacy users now select CONFIG_GPIOLIB_LEGACY.

> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index 020e51e30317a..543de15a12f63 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -4,7 +4,14 @@
>  #
>  
>  config GPIOLIB_LEGACY
> -	def_bool y
> +	bool "Legacy GPIO interfaces" if COMPILE_TEST

[Severity: High]
Does this change silently disable MFD_AAT2870_CORE, MFD_SI476X_CORE, and
SND_SOC_TLV320DAC33 in production builds?

The commit message states that all users of the legacy interface now select
CONFIG_GPIOLIB_LEGACY, but it appears these drivers still depend on it
instead:

drivers/mfd/Kconfig:
config MFD_AAT2870_CORE
    ...
    depends on GPIOLIB_LEGACY

drivers/mfd/Kconfig:
config MFD_SI476X_CORE
    ...
    depends on GPIOLIB_LEGACY

sound/soc/codecs/Kconfig:
config SND_SOC_TLV320DAC33
    ...
    depends on GPIOLIB_LEGACY

Since GPIOLIB_LEGACY now defaults to n and its prompt is hidden without
COMPILE_TEST, won't these dependencies prevent the drivers from being
selected on standard kernels, causing their hardware to stop functioning?

> +	help
> +	  There are a few legacy platforms that use the traditional GPIO
> +	  number based interfaces instead of GPIO descriptors.
> +	  Say Y here to enable build testing drivers that are specific
> +	  to those platforms.
> +
> +	  If unsure, say N.

-- 
Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=6