* [PATCH 00/21] gpiolib: fence off legacy interfaces
@ 2025-08-08 15:17 Arnd Bergmann
2025-08-08 15:17 ` [PATCH 06/21] x86/olpc: select GPIOLIB_LEGACY Arnd Bergmann
` (7 more replies)
0 siblings, 8 replies; 14+ messages in thread
From: Arnd Bergmann @ 2025-08-08 15:17 UTC (permalink / raw)
To: Bartosz Golaszewski, Linus Walleij, linux-gpio
Cc: Arnd Bergmann, Andrew Lunn, Sebastian Hesselbarth,
Gregory Clement, Russell King, Daniel Mack, Haojian Zhuang,
Robert Jarzmik, Krzysztof Kozlowski, Alim Akhtar,
Geert Uytterhoeven, Thomas Bogendoerfer, Yoshinori Sato,
Rich Felker, John Paul Adrian Glaubitz, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
Dmitry Torokhov, Lee Jones, Pavel Machek, Mauro Carvalho Chehab,
Matti Vaittinen, Florian Fainelli, Jeff Johnson, Hans de Goede,
Ilpo Järvinen, Greg Kroah-Hartman, Jaroslav Kysela,
Takashi Iwai, Liam Girdwood, Mark Brown, Andy Shevchenko,
Dr. David Alan Gilbert, linux-arm-kernel, linux-kernel,
linux-samsung-soc, linux-m68k, linux-mips, linux-sh, linux-input,
linux-leds, linux-media, patches, netdev, linux-wireless, ath10k,
platform-driver-x86, linux-usb, linux-sound
From: Arnd Bergmann <arnd@arndb.de>
Commit 678bae2eaa81 ("gpiolib: make legacy interfaces optional") was
merged for linux-6.17, so now it is possible to use the legacy interfaces
conditionally and eventually have the support left out of the kernel
whenever it is not needed.
I created six patches to force-enable CONFIG_GPIOLIB_LEGACY on the
few (mostly ancient) platforms that still require this, plus a set of
patches to either add the corresponding Kconfig dependencies that make
the device drivers conditional on that symbol, or change them to no
longer require it.
The final patch ends up turning the Kconfig symbol off by default,
which of course depends on everything else getting merged first to avoid
build errors.
I would suggest that patches 1-20 can just get merged through the
respective maintainer trees independently when they are deemed ready,
and the final patch can wait another merge window.
Arnd
Arnd Bergmann (21):
ARM: select legacy gpiolib interfaces where used
m68k: coldfire: select legacy gpiolib interface for mcfqspi
mips: select legacy gpiolib interfaces where used
sh: select legacy gpiolib interface
x86/platform: select legacy gpiolib interfaces where used
x86/olpc: select GPIOLIB_LEGACY
mfd: wm8994: remove dead legacy-gpio code
ASoC: add GPIOLIB_LEGACY dependency where needed
input: gpio-keys: make legacy gpiolib optional
leds: gpio: make legacy gpiolib interface optional
media: em28xx: add special case for legacy gpiolib interface
mfd: arizona: make legacy gpiolib interface optional
mfd: si476x: add GPIOLIB_LEGACY dependency
mfd: aat2870: add GPIOLIB_LEGACY dependency
dsa: b53: hide legacy gpiolib usage on non-mips
ath10k: remove gpio number assignment
nfc: marvell: convert to gpio descriptors
nfc: s3fwrn5: convert to gpio descriptors
usb: udc: pxa: remove unused platform_data
ASoC: pxa: add GPIOLIB_LEGACY dependency
gpiolib: turn off legacy interface by default
arch/arm/mach-mv78xx0/Kconfig | 1 +
arch/arm/mach-orion5x/Kconfig | 1 +
arch/arm/mach-pxa/Kconfig | 1 +
arch/arm/mach-pxa/devices.c | 7 --
arch/arm/mach-pxa/gumstix.c | 1 -
arch/arm/mach-pxa/udc.h | 8 --
arch/arm/mach-s3c/Kconfig.s3c64xx | 1 +
arch/arm/mach-sa1100/Kconfig | 1 +
arch/m68k/Kconfig.cpu | 1 +
arch/mips/Kconfig | 5 +
arch/mips/alchemy/Kconfig | 1 -
arch/mips/txx9/Kconfig | 1 +
arch/sh/Kconfig | 1 +
arch/sh/boards/Kconfig | 8 ++
arch/sh/boards/mach-highlander/Kconfig | 1 +
arch/sh/boards/mach-rsk/Kconfig | 3 +
arch/x86/Kconfig | 1 +
drivers/gpio/Kconfig | 11 ++-
drivers/input/keyboard/gpio_keys.c | 5 +-
drivers/input/keyboard/gpio_keys_polled.c | 2 +
drivers/input/misc/Kconfig | 3 +
drivers/leds/leds-gpio.c | 8 +-
drivers/media/usb/em28xx/Kconfig | 1 +
drivers/media/usb/em28xx/em28xx-dvb.c | 4 +-
drivers/mfd/Kconfig | 2 +
drivers/mfd/arizona-irq.c | 5 +-
drivers/mfd/rohm-bd71828.c | 2 +
drivers/mfd/rohm-bd718x7.c | 2 +
drivers/mfd/wm8994-irq.c | 94 +------------------
drivers/net/dsa/b53/b53_common.c | 17 +---
drivers/net/dsa/b53/b53_priv.h | 24 +++--
drivers/net/wireless/ath/ath10k/leds.c | 3 +-
drivers/nfc/nfcmrvl/main.c | 47 +++-------
drivers/nfc/nfcmrvl/nfcmrvl.h | 5 +-
drivers/nfc/nfcmrvl/uart.c | 5 -
drivers/nfc/nfcmrvl/usb.c | 1 -
drivers/nfc/s3fwrn5/i2c.c | 42 +++------
drivers/nfc/s3fwrn5/phy_common.c | 12 +--
drivers/nfc/s3fwrn5/phy_common.h | 4 +-
drivers/nfc/s3fwrn5/uart.c | 30 ++----
drivers/platform/x86/Kconfig | 3 +
.../platform/x86/x86-android-tablets/Kconfig | 1 +
drivers/usb/gadget/udc/pxa25x_udc.c | 41 +++-----
drivers/usb/gadget/udc/pxa25x_udc.h | 2 +-
drivers/usb/gadget/udc/pxa27x_udc.c | 35 +------
drivers/usb/gadget/udc/pxa27x_udc.h | 2 -
include/linux/gpio_keys.h | 2 +
include/linux/leds.h | 2 +
include/linux/mfd/arizona/pdata.h | 6 ++
include/linux/mfd/wm8994/pdata.h | 5 -
include/linux/platform_data/pxa2xx_udc.h | 15 ---
sound/pci/Kconfig | 1 +
sound/soc/codecs/Kconfig | 4 +
sound/soc/codecs/arizona-jack.c | 17 +++-
sound/soc/pxa/Kconfig | 4 +-
55 files changed, 192 insertions(+), 320 deletions(-)
delete mode 100644 arch/arm/mach-pxa/udc.h
--
2.39.5
Cc: Linus Walleij <linus.walleij@linaro.org> (maintainer:GPIO SUBSYSTEM,commit_signer:1/2=50%)
Cc: Bartosz Golaszewski <brgl@bgdev.pl> (maintainer:GPIO SUBSYSTEM,commit_signer:1/7=14%,commit_signer:1/2=50%)
Cc: linux-gpio@vger.kernel.org (open list:GPIO SUBSYSTEM)
Cc: Andrew Lunn <andrew@lunn.ch> (maintainer:ARM/Marvell Dove/MV78xx0/Orion SOC support)
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> (maintainer:ARM/Marvell Dove/MV78xx0/Orion SOC support)
Cc: Gregory Clement <gregory.clement@bootlin.com> (maintainer:ARM/Marvell Dove/MV78xx0/Orion SOC support)
Cc: Russell King <linux@armlinux.org.uk> (maintainer:ARM PORT)
Cc: Daniel Mack <daniel@zonque.org> (maintainer:PXA2xx/PXA3xx SUPPORT)
Cc: Haojian Zhuang <haojian.zhuang@gmail.com> (maintainer:PXA2xx/PXA3xx SUPPORT)
Cc: Robert Jarzmik <robert.jarzmik@free.fr> (maintainer:PXA2xx/PXA3xx SUPPORT)
Cc: Krzysztof Kozlowski <krzk@kernel.org> (maintainer:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES,commit_signer:1/2=50%)
Cc: Alim Akhtar <alim.akhtar@samsung.com> (reviewer:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES)
Cc: Geert Uytterhoeven <geert@linux-m68k.org> (maintainer:M68K ARCHITECTURE,commit_signer:1/4=25%,authored:1/4=25%,added_lines:2/13=15%,removed_lines:2/6=33%)
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> (maintainer:MIPS)
Cc: Yoshinori Sato <ysato@users.sourceforge.jp> (maintainer:SUPERH)
Cc: Rich Felker <dalias@libc.org> (maintainer:SUPERH)
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> (maintainer:SUPERH,commit_signer:2/4=50%)
Cc: Thomas Gleixner <tglx@linutronix.de> (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),added_lines:4/36=11%,removed_lines:6/49=12%)
Cc: Ingo Molnar <mingo@redhat.com> (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT))
Cc: Borislav Petkov <bp@alien8.de> (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT))
Cc: Dave Hansen <dave.hansen@linux.intel.com> (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT))
Cc: x86@kernel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT))
Cc: "H. Peter Anvin" <hpa@zytor.com> (reviewer:X86 ARCHITECTURE (32-BIT AND 64-BIT))
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> (maintainer:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)...,commit_signer:5/7=71%,authored:1/7=14%,added_lines:17/36=47%,removed_lines:27/49=55%,commit_signer:1/2=50%,commit_signer:3/5=60%)
Cc: Lee Jones <lee@kernel.org> (maintainer:LED SUBSYSTEM,commit_signer:2/5=40%)
Cc: Pavel Machek <pavel@kernel.org> (maintainer:LED SUBSYSTEM)
Cc: Mauro Carvalho Chehab <mchehab@kernel.org> (maintainer:EM28XX VIDEO4LINUX DRIVER)
Cc: Matti Vaittinen <mazziesaccount@gmail.com> (maintainer:ROHM POWER MANAGEMENT IC DEVICE DRIVERS)
Cc: Florian Fainelli <florian.fainelli@broadcom.com> (maintainer:BROADCOM B53/SF2 ETHERNET SWITCH DRIVER)
Cc: Jeff Johnson <jjohnson@kernel.org> (maintainer:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER)
Cc: Hans de Goede <hansg@kernel.org> (maintainer:X86 PLATFORM DRIVERS,commit_signer:1/7=14%)
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com> (maintainer:X86 PLATFORM DRIVERS)
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (maintainer:USB SUBSYSTEM)
Cc: Jaroslav Kysela <perex@perex.cz> (maintainer:SOUND)
Cc: Takashi Iwai <tiwai@suse.com> (maintainer:SOUND,commit_signer:1/3=33%,authored:1/3=33%,removed_lines:2/2=100%)
Cc: Liam Girdwood <lgirdwood@gmail.com> (maintainer:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...)
Cc: Mark Brown <broonie@kernel.org> (maintainer:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,commit_signer:26/29=90%,commit_signer:1/3=33%)
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> (authored:1/7=14%,added_lines:4/36=11%,removed_lines:6/49=12%,commit_signer:1/2=50%,authored:1/2=50%,added_lines:5/7=71%,removed_lines:7/7=100%,added_lines:7/7=100%,removed_lines:2/7=29%)
Cc: "Dr. David Alan Gilbert" <linux@treblig.org> (commit_signer:1/5=20%,authored:1/5=20%,removed_lines:7/10=70%)
Cc: linux-arm-kernel@lists.infradead.org (moderated list:ARM/Marvell Dove/MV78xx0/Orion SOC support)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: linux-samsung-soc@vger.kernel.org (open list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES)
Cc: linux-m68k@lists.linux-m68k.org (open list:M68K ARCHITECTURE)
Cc: linux-mips@vger.kernel.org (open list:MIPS)
Cc: linux-sh@vger.kernel.org (open list:SUPERH)
Cc: linux-input@vger.kernel.org (open list:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)...)
Cc: linux-leds@vger.kernel.org (open list:LED SUBSYSTEM)
Cc: linux-media@vger.kernel.org (open list:EM28XX VIDEO4LINUX DRIVER)
Cc: patches@opensource.cirrus.com (open list:WOLFSON MICROELECTRONICS DRIVERS)
Cc: netdev@vger.kernel.org (open list:BROADCOM B53/SF2 ETHERNET SWITCH DRIVER)
Cc: linux-wireless@vger.kernel.org (open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER)
Cc: ath10k@lists.infradead.org (open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER)
Cc: platform-driver-x86@vger.kernel.org (open list:X86 PLATFORM DRIVERS)
Cc: linux-usb@vger.kernel.org (open list:USB SUBSYSTEM)
Cc: linux-sound@vger.kernel.org (open list:SOUND)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 06/21] x86/olpc: select GPIOLIB_LEGACY
2025-08-08 15:17 [PATCH 00/21] gpiolib: fence off legacy interfaces Arnd Bergmann
@ 2025-08-08 15:17 ` Arnd Bergmann
2025-08-12 17:01 ` Borislav Petkov
2025-08-08 15:17 ` [PATCH 08/21] ASoC: add GPIOLIB_LEGACY dependency where needed Arnd Bergmann
` (6 subsequent siblings)
7 siblings, 1 reply; 14+ messages in thread
From: Arnd Bergmann @ 2025-08-08 15:17 UTC (permalink / raw)
To: Bartosz Golaszewski, Linus Walleij, linux-gpio, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, Jaroslav Kysela,
Takashi Iwai
Cc: Arnd Bergmann, H. Peter Anvin, Andrew Morton,
Mateusz Jończyk, linux-kernel, linux-sound
From: Arnd Bergmann <arnd@arndb.de>
The OLPC GPIO controller sets up a fixed number space that is used
by at least two drivers:
arch/x86/platform/olpc/olpc-xo1-sci.c: In function 'setup_ec_sci':
arch/x86/platform/olpc/olpc-xo1-sci.c:358:13: error: implicit declaration of function 'gpio_request' [-Wimplicit-function-declaration]
358 | r = gpio_request(OLPC_GPIO_ECSCI, "OLPC-ECSCI");
| ^~~~~~~~~~~~
sound/pci/cs5535audio/cs5535audio_olpc.c: In function 'olpc_analog_input':
sound/pci/cs5535audio/cs5535audio_olpc.c:41:9: error: implicit declaration of function 'gpio_set_value'; did you mean 'gpiod_set_value'? [-Wimplicit-function-declaration]
41 | gpio_set_value(OLPC_GPIO_MIC_AC, on);
Select CONFIG_GPIOLIB_LEGACY for this platform and make sure the
sound driver portion cannot be compiled without this.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/x86/Kconfig | 1 +
sound/pci/Kconfig | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 58d890fe2100..3fd5e378a9f1 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -3006,6 +3006,7 @@ config OLPC
bool "One Laptop Per Child support"
depends on !X86_PAE
select GPIOLIB
+ select GPIOLIB_LEGACY
select OF
select OF_PROMTREE
select IRQ_DOMAIN
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
index e0996a9d90b0..6366f72b3667 100644
--- a/sound/pci/Kconfig
+++ b/sound/pci/Kconfig
@@ -300,6 +300,7 @@ config SND_CS5535AUDIO
tristate "CS5535/CS5536 Audio"
depends on X86_32 || MIPS || COMPILE_TEST
depends on HAS_IOPORT
+ depends on GPIOLIB_LEGACY || !OLPC
select SND_PCM
select SND_AC97_CODEC
help
--
2.39.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 08/21] ASoC: add GPIOLIB_LEGACY dependency where needed
2025-08-08 15:17 [PATCH 00/21] gpiolib: fence off legacy interfaces Arnd Bergmann
2025-08-08 15:17 ` [PATCH 06/21] x86/olpc: select GPIOLIB_LEGACY Arnd Bergmann
@ 2025-08-08 15:17 ` Arnd Bergmann
2025-08-08 15:17 ` [PATCH 12/21] mfd: arizona: make legacy gpiolib interface optional Arnd Bergmann
` (5 subsequent siblings)
7 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2025-08-08 15:17 UTC (permalink / raw)
To: Bartosz Golaszewski, Linus Walleij, linux-gpio, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: Arnd Bergmann, ChiYuan Huang, Igor Prusov, Weidong Wang,
Richard Fitzgerald, Binbin Zhou, Jack Yu, Shenghao Ding, Nuno Sa,
André Apitzsch, linux-sound, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
In order to make the legacy gpiolib interfaces such as gpio_request()
optional, mark the three ASoC driver that rely on it today with a
dependency on the new Kconfig symbol.
The tlv320dac33 and ak4641 drivers have no in-tree users, while the
uda1380 driver is theoretically referened by two lpc3250 based boards,
but neither of them work because of the legacy gpiolib dependency.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
sound/soc/codecs/Kconfig | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 6d7e4725d89c..759bcb8260cd 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -622,6 +622,7 @@ config SND_SOC_AK4619
config SND_SOC_AK4641
tristate
depends on I2C
+ depends on GPIOLIB_LEGACY
config SND_SOC_AK4642
tristate "AKM AK4642 CODEC"
@@ -2175,6 +2176,7 @@ config SND_SOC_TLV320AIC3X_SPI
config SND_SOC_TLV320DAC33
tristate
depends on I2C
+ depends on GPIOLIB_LEGACY
config SND_SOC_TLV320ADCX140
tristate "Texas Instruments TLV320ADCX140 CODEC family"
@@ -2229,6 +2231,7 @@ config SND_SOC_UDA1342
config SND_SOC_UDA1380
tristate
depends on I2C
+ depends on GPIOLIB_LEGACY
config SND_SOC_WCD_CLASSH
tristate
--
2.39.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 12/21] mfd: arizona: make legacy gpiolib interface optional
2025-08-08 15:17 [PATCH 00/21] gpiolib: fence off legacy interfaces Arnd Bergmann
2025-08-08 15:17 ` [PATCH 06/21] x86/olpc: select GPIOLIB_LEGACY Arnd Bergmann
2025-08-08 15:17 ` [PATCH 08/21] ASoC: add GPIOLIB_LEGACY dependency where needed Arnd Bergmann
@ 2025-08-08 15:17 ` Arnd Bergmann
2025-09-02 12:44 ` Lee Jones
2025-08-08 15:17 ` [PATCH 13/21] mfd: si476x: add GPIOLIB_LEGACY dependency Arnd Bergmann
` (4 subsequent siblings)
7 siblings, 1 reply; 14+ messages in thread
From: Arnd Bergmann @ 2025-08-08 15:17 UTC (permalink / raw)
To: Bartosz Golaszewski, Linus Walleij, linux-gpio, Lee Jones,
Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: Arnd Bergmann, Jiri Slaby (SUSE), Sakari Ailus, Charles Keepax,
patches, linux-kernel, linux-sound
From: Arnd Bergmann <arnd@arndb.de>
The only machine that still uses the old gpio number based interface
is the wlf_cragg_6410 board file. In order to remove the dependency
on the interfaces, add #ifdef blocks here.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/mfd/arizona-irq.c | 5 ++++-
include/linux/mfd/arizona/pdata.h | 6 ++++++
sound/soc/codecs/arizona-jack.c | 17 ++++++++++++++++-
3 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/arizona-irq.c b/drivers/mfd/arizona-irq.c
index 3f8622ee0e59..544016d420fe 100644
--- a/drivers/mfd/arizona-irq.c
+++ b/drivers/mfd/arizona-irq.c
@@ -136,7 +136,7 @@ static irqreturn_t arizona_irq_thread(int irq, void *data)
dev_err(arizona->dev,
"Failed to read main IRQ status: %d\n", ret);
}
-
+#ifdef CONFIG_GPIOLIB_LEGACY
/*
* Poll the IRQ pin status to see if we're really done
* if the interrupt controller can't do it for us.
@@ -150,6 +150,7 @@ static irqreturn_t arizona_irq_thread(int irq, void *data)
!gpio_get_value_cansleep(arizona->pdata.irq_gpio)) {
poll = true;
}
+#endif
} while (poll);
pm_runtime_put_autosuspend(arizona->dev);
@@ -349,6 +350,7 @@ int arizona_irq_init(struct arizona *arizona)
goto err_map_main_irq;
}
+#ifdef CONFIG_GPIOLIB_LEGACY
/* Used to emulate edge trigger and to work around broken pinmux */
if (arizona->pdata.irq_gpio) {
if (gpio_to_irq(arizona->pdata.irq_gpio) != arizona->irq) {
@@ -368,6 +370,7 @@ int arizona_irq_init(struct arizona *arizona)
arizona->pdata.irq_gpio = 0;
}
}
+#endif
ret = request_threaded_irq(arizona->irq, NULL, arizona_irq_thread,
flags, "arizona", arizona);
diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h
index 2d13bbea4f3a..f72e6d4b14a7 100644
--- a/include/linux/mfd/arizona/pdata.h
+++ b/include/linux/mfd/arizona/pdata.h
@@ -117,8 +117,10 @@ struct arizona_pdata {
/** Check for line output with HPDET method */
bool hpdet_acc_id_line;
+#ifdef CONFIG_GPIOLIB_LEGACY
/** GPIO used for mic isolation with HPDET */
int hpdet_id_gpio;
+#endif
/** Channel to use for headphone detection */
unsigned int hpdet_channel;
@@ -129,8 +131,10 @@ struct arizona_pdata {
/** Extra debounce timeout used during initial mic detection (ms) */
unsigned int micd_detect_debounce;
+#ifdef CONFIG_GPIOLIB_LEGACY
/** GPIO for mic detection polarity */
int micd_pol_gpio;
+#endif
/** Mic detect ramp rate */
unsigned int micd_bias_start_time;
@@ -184,8 +188,10 @@ struct arizona_pdata {
/** Haptic actuator type */
unsigned int hap_act;
+#ifdef CONFIG_GPIOLIB_LEGACY
/** GPIO for primary IRQ (used for edge triggered emulation) */
int irq_gpio;
+#endif
/** General purpose switch control */
unsigned int gpsw;
diff --git a/sound/soc/codecs/arizona-jack.c b/sound/soc/codecs/arizona-jack.c
index 22f9c431a0e5..6b55610ad535 100644
--- a/sound/soc/codecs/arizona-jack.c
+++ b/sound/soc/codecs/arizona-jack.c
@@ -461,7 +461,11 @@ static int arizona_hpdet_do_id(struct arizona_priv *info, int *reading,
bool *mic)
{
struct arizona *arizona = info->arizona;
+#ifdef CONFIG_GPIOLIB_LEGACY
int id_gpio = arizona->pdata.hpdet_id_gpio;
+#else
+ int id_gpio = 0;
+#endif
if (!arizona->pdata.hpdet_acc_id)
return 0;
@@ -472,6 +476,7 @@ static int arizona_hpdet_do_id(struct arizona_priv *info, int *reading,
*/
info->hpdet_res[info->num_hpdet_res++] = *reading;
+#ifdef CONFIG_GPIOLIB_LEGACY
/* Only check the mic directly if we didn't already ID it */
if (id_gpio && info->num_hpdet_res == 1) {
dev_dbg(arizona->dev, "Measuring mic\n");
@@ -489,6 +494,7 @@ static int arizona_hpdet_do_id(struct arizona_priv *info, int *reading,
ARIZONA_HP_POLL, ARIZONA_HP_POLL);
return -EAGAIN;
}
+#endif
/* OK, got both. Now, compare... */
dev_dbg(arizona->dev, "HPDET measured %d %d\n",
@@ -529,7 +535,9 @@ static irqreturn_t arizona_hpdet_irq(int irq, void *data)
{
struct arizona_priv *info = data;
struct arizona *arizona = info->arizona;
+#ifdef CONFIG_GPIOLIB_LEGACY
int id_gpio = arizona->pdata.hpdet_id_gpio;
+#endif
int ret, reading, state, report;
bool mic = false;
@@ -585,8 +593,10 @@ static irqreturn_t arizona_hpdet_irq(int irq, void *data)
arizona_extcon_hp_clamp(info, false);
+#ifdef CONFIG_GPIOLIB_LEGACY
if (id_gpio)
gpio_set_value_cansleep(id_gpio, 0);
+#endif
/* If we have a mic then reenable MICDET */
if (state && (mic || info->mic))
@@ -1317,6 +1327,7 @@ int arizona_jack_codec_dev_probe(struct arizona_priv *info, struct device *dev)
regmap_update_bits(arizona->regmap, ARIZONA_GP_SWITCH_1,
ARIZONA_SW1_MODE_MASK, arizona->pdata.gpsw);
+#ifdef CONFIG_GPIOLIB_LEGACY
if (pdata->micd_pol_gpio > 0) {
if (info->micd_modes[0].gpio)
mode = GPIOF_OUT_INIT_HIGH;
@@ -1332,7 +1343,9 @@ int arizona_jack_codec_dev_probe(struct arizona_priv *info, struct device *dev)
}
info->micd_pol_gpio = gpio_to_desc(pdata->micd_pol_gpio);
- } else {
+ } else
+#endif
+ {
if (info->micd_modes[0].gpio)
mode = GPIOD_OUT_HIGH;
else
@@ -1353,6 +1366,7 @@ int arizona_jack_codec_dev_probe(struct arizona_priv *info, struct device *dev)
}
}
+#ifdef CONFIG_GPIOLIB_LEGACY
if (arizona->pdata.hpdet_id_gpio > 0) {
ret = devm_gpio_request_one(dev, arizona->pdata.hpdet_id_gpio,
GPIOF_OUT_INIT_LOW,
@@ -1364,6 +1378,7 @@ int arizona_jack_codec_dev_probe(struct arizona_priv *info, struct device *dev)
return ret;
}
}
+#endif
return 0;
}
--
2.39.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 13/21] mfd: si476x: add GPIOLIB_LEGACY dependency
2025-08-08 15:17 [PATCH 00/21] gpiolib: fence off legacy interfaces Arnd Bergmann
` (2 preceding siblings ...)
2025-08-08 15:17 ` [PATCH 12/21] mfd: arizona: make legacy gpiolib interface optional Arnd Bergmann
@ 2025-08-08 15:17 ` Arnd Bergmann
2025-08-08 15:18 ` [PATCH 20/21] ASoC: pxa: " Arnd Bergmann
` (3 subsequent siblings)
7 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2025-08-08 15:17 UTC (permalink / raw)
To: Bartosz Golaszewski, Linus Walleij, linux-gpio, Lee Jones,
Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: Arnd Bergmann, kernel test robot, Dr. David Alan Gilbert,
André Draszik, Krzysztof Kozlowski, Thomas Richard,
Charles Keepax, linux-kernel, linux-sound
From: Arnd Bergmann <arnd@arndb.de>
This driver uses the legacy gpiolib interfaces to get gpio
numbers from platform data:
drivers/mfd/si476x-i2c.c: In function 'si476x_core_start':
drivers/mfd/si476x-i2c.c:133:21: error: implicit declaration of function 'gpio_is_valid'; did you mean 'uuid_is_valid'? [-Werror=implicit-function-declaration]
133 | if (gpio_is_valid(core->gpio_reset))
There are no in-tree users of this driver, so nothing defines
the platform data.
Add a dependency on GPIOLIB_LEGACY for the moment to avoid the build
failure, and make sure the sound driver does not get built without the
mfd portion either pass that dependency along.
Alternatively, we could remove the mfd driver along with the radio and
sound portions.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202507231653.UFlH2dMO-lkp@intel.com/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/mfd/Kconfig | 1 +
sound/soc/codecs/Kconfig | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 425c5fba6cb1..6d52a3d22430 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -1411,6 +1411,7 @@ config MFD_SEC_I2C
config MFD_SI476X_CORE
tristate "Silicon Laboratories 4761/64/68 AM/FM radio."
depends on I2C
+ depends on GPIOLIB_LEGACY
select MFD_CORE
select REGMAP_I2C
help
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 759bcb8260cd..9d5b449fa747 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1903,6 +1903,7 @@ config SND_SOC_SGTL5000
config SND_SOC_SI476X
tristate
+ depends on MFD_SI476X_CORE
config SND_SOC_SIGMADSP
tristate
--
2.39.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 20/21] ASoC: pxa: add GPIOLIB_LEGACY dependency
2025-08-08 15:17 [PATCH 00/21] gpiolib: fence off legacy interfaces Arnd Bergmann
` (3 preceding siblings ...)
2025-08-08 15:17 ` [PATCH 13/21] mfd: si476x: add GPIOLIB_LEGACY dependency Arnd Bergmann
@ 2025-08-08 15:18 ` Arnd Bergmann
2025-08-11 13:10 ` [PATCH 00/21] gpiolib: fence off legacy interfaces Bartosz Golaszewski
` (2 subsequent siblings)
7 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2025-08-08 15:18 UTC (permalink / raw)
To: Bartosz Golaszewski, Linus Walleij, linux-gpio, Daniel Mack,
Haojian Zhuang, Robert Jarzmik, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai
Cc: Arnd Bergmann, Kuninori Morimoto, linux-arm-kernel, linux-sound,
linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The pxa27x platform uses the legacy gpiolib interfaces, including
in its sound drivers:
sound/arm/pxa2xx-ac97-lib.c: In function 'pxa2xx_ac97_hw_probe':
sound/arm/pxa2xx-ac97-lib.c:374:23: error: implicit declaration of function 'gpio_request_one' [-Wimplicit-function-declaration]
374 | ret = gpio_request_one(reset_gpio, GPIOF_OUT_INIT_HIGH,
Make sure we don't select those drivers for compile-testing unless
we are building for a pxa27x system, or CONFIG_GPIOLIB_LEGACY is
already enabled.
The SND_PXA_SOC_SSP driver accidentally used a dependency on PLAT_PXA,
which includes both ARCH_PXA and ARCH_MMP, but it is only used on
the former.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
sound/soc/pxa/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig
index e026f9912a6d..e54abcd39f79 100644
--- a/sound/soc/pxa/Kconfig
+++ b/sound/soc/pxa/Kconfig
@@ -3,7 +3,7 @@ menu "PXA"
config SND_PXA2XX_SOC
tristate "SoC Audio for the Intel PXA2xx chip"
- depends on ARCH_PXA || COMPILE_TEST
+ depends on ARCH_PXA || (COMPILE_TEST && GPIOLIB_LEGACY)
select SND_PXA2XX_LIB
help
Say Y or M if you want to add support for codecs attached to
@@ -26,7 +26,7 @@ config SND_PXA2XX_SOC_I2S
config SND_PXA_SOC_SSP
tristate "Soc Audio via PXA2xx/PXA3xx SSP ports"
- depends on PLAT_PXA
+ depends on ARCH_PXA
select PXA_SSP
select SND_PXA2XX_LIB
--
2.39.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 00/21] gpiolib: fence off legacy interfaces
2025-08-08 15:17 [PATCH 00/21] gpiolib: fence off legacy interfaces Arnd Bergmann
` (4 preceding siblings ...)
2025-08-08 15:18 ` [PATCH 20/21] ASoC: pxa: " Arnd Bergmann
@ 2025-08-11 13:10 ` Bartosz Golaszewski
2025-08-12 16:23 ` (subset) " Mark Brown
2025-09-02 12:56 ` Lee Jones
7 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2025-08-11 13:10 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Arnd Bergmann, Andrew Lunn, Sebastian Hesselbarth,
Gregory Clement, Russell King, Daniel Mack, Haojian Zhuang,
Robert Jarzmik, Krzysztof Kozlowski, Alim Akhtar,
Geert Uytterhoeven, Thomas Bogendoerfer, Yoshinori Sato,
Rich Felker, John Paul Adrian Glaubitz, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
Dmitry Torokhov, Lee Jones, Pavel Machek, Mauro Carvalho Chehab,
Matti Vaittinen, Florian Fainelli, Jeff Johnson, Hans de Goede,
Ilpo Järvinen, Greg Kroah-Hartman, Jaroslav Kysela,
Takashi Iwai, Liam Girdwood, Mark Brown, Andy Shevchenko,
Dr. David Alan Gilbert, linux-arm-kernel, linux-kernel,
linux-samsung-soc, linux-m68k, linux-mips, linux-sh, linux-input,
linux-leds, linux-media, patches, netdev, linux-wireless, ath10k,
platform-driver-x86, linux-usb, linux-sound, Bartosz Golaszewski,
Linus Walleij, linux-gpio
On Fri, 8 Aug 2025 17:17:44 +0200, Arnd Bergmann <arnd@kernel.org> said:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Commit 678bae2eaa81 ("gpiolib: make legacy interfaces optional") was
> merged for linux-6.17, so now it is possible to use the legacy interfaces
> conditionally and eventually have the support left out of the kernel
> whenever it is not needed.
>
> I created six patches to force-enable CONFIG_GPIOLIB_LEGACY on the
> few (mostly ancient) platforms that still require this, plus a set of
> patches to either add the corresponding Kconfig dependencies that make
> the device drivers conditional on that symbol, or change them to no
> longer require it.
>
> The final patch ends up turning the Kconfig symbol off by default,
> which of course depends on everything else getting merged first to avoid
> build errors.
>
> I would suggest that patches 1-20 can just get merged through the
> respective maintainer trees independently when they are deemed ready,
> and the final patch can wait another merge window.
>
Oh, not at all, I'm fine sending a second PR late into the merge window to
get that done in a single cycle.
Thanks for doing this, awesome work!
Bartosz
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: (subset) [PATCH 00/21] gpiolib: fence off legacy interfaces
2025-08-08 15:17 [PATCH 00/21] gpiolib: fence off legacy interfaces Arnd Bergmann
` (5 preceding siblings ...)
2025-08-11 13:10 ` [PATCH 00/21] gpiolib: fence off legacy interfaces Bartosz Golaszewski
@ 2025-08-12 16:23 ` Mark Brown
2025-09-02 12:56 ` Lee Jones
7 siblings, 0 replies; 14+ messages in thread
From: Mark Brown @ 2025-08-12 16:23 UTC (permalink / raw)
To: Bartosz Golaszewski, Linus Walleij, linux-gpio, Arnd Bergmann
Cc: Arnd Bergmann, Andrew Lunn, Sebastian Hesselbarth,
Gregory Clement, Russell King, Daniel Mack, Haojian Zhuang,
Robert Jarzmik, Krzysztof Kozlowski, Alim Akhtar,
Geert Uytterhoeven, Thomas Bogendoerfer, Yoshinori Sato,
Rich Felker, John Paul Adrian Glaubitz, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
Dmitry Torokhov, Lee Jones, Pavel Machek, Mauro Carvalho Chehab,
Matti Vaittinen, Florian Fainelli, Jeff Johnson, Hans de Goede,
Ilpo Järvinen, Greg Kroah-Hartman, Jaroslav Kysela,
Takashi Iwai, Liam Girdwood, Andy Shevchenko,
Dr. David Alan Gilbert, linux-arm-kernel, linux-kernel,
linux-samsung-soc, linux-m68k, linux-mips, linux-sh, linux-input,
linux-leds, linux-media, patches, netdev, linux-wireless, ath10k,
platform-driver-x86, linux-usb, linux-sound
On Fri, 08 Aug 2025 17:17:44 +0200, Arnd Bergmann wrote:
> Commit 678bae2eaa81 ("gpiolib: make legacy interfaces optional") was
> merged for linux-6.17, so now it is possible to use the legacy interfaces
> conditionally and eventually have the support left out of the kernel
> whenever it is not needed.
>
> I created six patches to force-enable CONFIG_GPIOLIB_LEGACY on the
> few (mostly ancient) platforms that still require this, plus a set of
> patches to either add the corresponding Kconfig dependencies that make
> the device drivers conditional on that symbol, or change them to no
> longer require it.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[08/21] ASoC: add GPIOLIB_LEGACY dependency where needed
commit: 5383d67e2430822fa7bd20dcbbebbd8ae808e386
[20/21] ASoC: pxa: add GPIOLIB_LEGACY dependency
commit: 2d86d2585ab929a143d1e6f8963da1499e33bf13
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 06/21] x86/olpc: select GPIOLIB_LEGACY
2025-08-08 15:17 ` [PATCH 06/21] x86/olpc: select GPIOLIB_LEGACY Arnd Bergmann
@ 2025-08-12 17:01 ` Borislav Petkov
0 siblings, 0 replies; 14+ messages in thread
From: Borislav Petkov @ 2025-08-12 17:01 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Bartosz Golaszewski, Linus Walleij, linux-gpio, Thomas Gleixner,
Ingo Molnar, Dave Hansen, x86, Jaroslav Kysela, Takashi Iwai,
Arnd Bergmann, H. Peter Anvin, Andrew Morton,
Mateusz Jończyk, linux-kernel, linux-sound
On Fri, Aug 08, 2025 at 05:17:50PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The OLPC GPIO controller sets up a fixed number space that is used
> by at least two drivers:
>
> arch/x86/platform/olpc/olpc-xo1-sci.c: In function 'setup_ec_sci':
> arch/x86/platform/olpc/olpc-xo1-sci.c:358:13: error: implicit declaration of function 'gpio_request' [-Wimplicit-function-declaration]
> 358 | r = gpio_request(OLPC_GPIO_ECSCI, "OLPC-ECSCI");
> | ^~~~~~~~~~~~
> sound/pci/cs5535audio/cs5535audio_olpc.c: In function 'olpc_analog_input':
> sound/pci/cs5535audio/cs5535audio_olpc.c:41:9: error: implicit declaration of function 'gpio_set_value'; did you mean 'gpiod_set_value'? [-Wimplicit-function-declaration]
> 41 | gpio_set_value(OLPC_GPIO_MIC_AC, on);
>
> Select CONFIG_GPIOLIB_LEGACY for this platform and make sure the
> sound driver portion cannot be compiled without this.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/x86/Kconfig | 1 +
> sound/pci/Kconfig | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 58d890fe2100..3fd5e378a9f1 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -3006,6 +3006,7 @@ config OLPC
> bool "One Laptop Per Child support"
> depends on !X86_PAE
> select GPIOLIB
> + select GPIOLIB_LEGACY
> select OF
> select OF_PROMTREE
> select IRQ_DOMAIN
> diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
> index e0996a9d90b0..6366f72b3667 100644
> --- a/sound/pci/Kconfig
> +++ b/sound/pci/Kconfig
> @@ -300,6 +300,7 @@ config SND_CS5535AUDIO
> tristate "CS5535/CS5536 Audio"
> depends on X86_32 || MIPS || COMPILE_TEST
> depends on HAS_IOPORT
> + depends on GPIOLIB_LEGACY || !OLPC
> select SND_PCM
> select SND_AC97_CODEC
> help
> --
Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 12/21] mfd: arizona: make legacy gpiolib interface optional
2025-08-08 15:17 ` [PATCH 12/21] mfd: arizona: make legacy gpiolib interface optional Arnd Bergmann
@ 2025-09-02 12:44 ` Lee Jones
2025-09-02 13:47 ` Arnd Bergmann
0 siblings, 1 reply; 14+ messages in thread
From: Lee Jones @ 2025-09-02 12:44 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Bartosz Golaszewski, Linus Walleij, linux-gpio, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, Arnd Bergmann,
Jiri Slaby (SUSE), Sakari Ailus, Charles Keepax, patches,
linux-kernel, linux-sound
On Fri, 08 Aug 2025, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The only machine that still uses the old gpio number based interface
> is the wlf_cragg_6410 board file. In order to remove the dependency
> on the interfaces, add #ifdef blocks here.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/mfd/arizona-irq.c | 5 ++++-
> include/linux/mfd/arizona/pdata.h | 6 ++++++
> sound/soc/codecs/arizona-jack.c | 17 ++++++++++++++++-
> 3 files changed, 26 insertions(+), 2 deletions(-)
Just FTR, I hate this! =:-D
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: (subset) [PATCH 00/21] gpiolib: fence off legacy interfaces
2025-08-08 15:17 [PATCH 00/21] gpiolib: fence off legacy interfaces Arnd Bergmann
` (6 preceding siblings ...)
2025-08-12 16:23 ` (subset) " Mark Brown
@ 2025-09-02 12:56 ` Lee Jones
7 siblings, 0 replies; 14+ messages in thread
From: Lee Jones @ 2025-09-02 12:56 UTC (permalink / raw)
To: Bartosz Golaszewski, Linus Walleij, linux-gpio, Arnd Bergmann
Cc: Arnd Bergmann, Andrew Lunn, Sebastian Hesselbarth,
Gregory Clement, Russell King, Daniel Mack, Haojian Zhuang,
Robert Jarzmik, Krzysztof Kozlowski, Alim Akhtar,
Geert Uytterhoeven, Thomas Bogendoerfer, Yoshinori Sato,
Rich Felker, John Paul Adrian Glaubitz, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
Dmitry Torokhov, Lee Jones, Pavel Machek, Mauro Carvalho Chehab,
Matti Vaittinen, Florian Fainelli, Jeff Johnson, Hans de Goede,
Ilpo Järvinen, Greg Kroah-Hartman, Jaroslav Kysela,
Takashi Iwai, Liam Girdwood, Mark Brown, Andy Shevchenko,
Dr. David Alan Gilbert, linux-arm-kernel, linux-kernel,
linux-samsung-soc, linux-m68k, linux-mips, linux-sh, linux-input,
linux-leds, linux-media, patches, netdev, linux-wireless, ath10k,
platform-driver-x86, linux-usb, linux-sound
On Fri, 08 Aug 2025 17:17:44 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Commit 678bae2eaa81 ("gpiolib: make legacy interfaces optional") was
> merged for linux-6.17, so now it is possible to use the legacy interfaces
> conditionally and eventually have the support left out of the kernel
> whenever it is not needed.
>
> [...]
Applied, thanks!
[12/21] mfd: arizona: make legacy gpiolib interface optional
commit: 12f6c0afc8987d72017a3ecf7c1183cb951b0d24
[13/21] mfd: si476x: add GPIOLIB_LEGACY dependency
commit: 1ae250257e43b3fba225e4f8ea7d87125dc861ae
[14/21] mfd: aat2870: add GPIOLIB_LEGACY dependency
commit: 3144986f37911f131f373743f294b2941a8ef37c
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 12/21] mfd: arizona: make legacy gpiolib interface optional
2025-09-02 12:44 ` Lee Jones
@ 2025-09-02 13:47 ` Arnd Bergmann
2025-09-03 8:05 ` Lee Jones
0 siblings, 1 reply; 14+ messages in thread
From: Arnd Bergmann @ 2025-09-02 13:47 UTC (permalink / raw)
To: Lee Jones, Arnd Bergmann
Cc: Bartosz Golaszewski, Linus Walleij, open list:GPIO SUBSYSTEM,
Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Jiri Slaby, Sakari Ailus, Charles Keepax, patches, linux-kernel,
linux-sound
On Tue, Sep 2, 2025, at 14:44, Lee Jones wrote:
> On Fri, 08 Aug 2025, Arnd Bergmann wrote:
>
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> The only machine that still uses the old gpio number based interface
>> is the wlf_cragg_6410 board file. In order to remove the dependency
>> on the interfaces, add #ifdef blocks here.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>> drivers/mfd/arizona-irq.c | 5 ++++-
>> include/linux/mfd/arizona/pdata.h | 6 ++++++
>> sound/soc/codecs/arizona-jack.c | 17 ++++++++++++++++-
>> 3 files changed, 26 insertions(+), 2 deletions(-)
>
> Just FTR, I hate this! =:-D
Any alternative suggestions?
Would you be happier with a hard "depends on GPIOLIB_LEGACY"?
I see only two in-tree users other than the old 6410 board
that use the modern path: exynos5433-tm2-common.dtsi
and drivers/platform/x86/x86-android-tablets/lenovo.c.
Making those platforms 'select GPIOLIB_LEGACY' is technically
incorrect since they don't need the legayc interfaces, but it
would be a temporary workaround until wlf_cragg_6410 is
gone.
Arnd
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 12/21] mfd: arizona: make legacy gpiolib interface optional
2025-09-02 13:47 ` Arnd Bergmann
@ 2025-09-03 8:05 ` Lee Jones
2025-09-03 9:26 ` Arnd Bergmann
0 siblings, 1 reply; 14+ messages in thread
From: Lee Jones @ 2025-09-03 8:05 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Arnd Bergmann, Bartosz Golaszewski, Linus Walleij,
open list:GPIO SUBSYSTEM, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai, Jiri Slaby, Sakari Ailus,
Charles Keepax, patches, linux-kernel, linux-sound
On Tue, 02 Sep 2025, Arnd Bergmann wrote:
> On Tue, Sep 2, 2025, at 14:44, Lee Jones wrote:
> > On Fri, 08 Aug 2025, Arnd Bergmann wrote:
> >
> >> From: Arnd Bergmann <arnd@arndb.de>
> >>
> >> The only machine that still uses the old gpio number based interface
> >> is the wlf_cragg_6410 board file. In order to remove the dependency
> >> on the interfaces, add #ifdef blocks here.
> >>
> >> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> >> ---
> >> drivers/mfd/arizona-irq.c | 5 ++++-
> >> include/linux/mfd/arizona/pdata.h | 6 ++++++
> >> sound/soc/codecs/arizona-jack.c | 17 ++++++++++++++++-
> >> 3 files changed, 26 insertions(+), 2 deletions(-)
> >
> > Just FTR, I hate this! =:-D
>
> Any alternative suggestions?
>
> Would you be happier with a hard "depends on GPIOLIB_LEGACY"?
>
> I see only two in-tree users other than the old 6410 board
> that use the modern path: exynos5433-tm2-common.dtsi
> and drivers/platform/x86/x86-android-tablets/lenovo.c.
>
> Making those platforms 'select GPIOLIB_LEGACY' is technically
> incorrect since they don't need the legayc interfaces, but it
> would be a temporary workaround until wlf_cragg_6410 is
> gone.
I've applied the patches for now in the hope that these can get cleaned
away at one point.
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 12/21] mfd: arizona: make legacy gpiolib interface optional
2025-09-03 8:05 ` Lee Jones
@ 2025-09-03 9:26 ` Arnd Bergmann
0 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2025-09-03 9:26 UTC (permalink / raw)
To: Lee Jones
Cc: Arnd Bergmann, Bartosz Golaszewski, Linus Walleij,
open list:GPIO SUBSYSTEM, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai, Jiri Slaby, Sakari Ailus,
Charles Keepax, patches, linux-kernel, linux-sound
On Wed, Sep 3, 2025, at 10:05, Lee Jones wrote:
> On Tue, 02 Sep 2025, Arnd Bergmann wrote:
>> Making those platforms 'select GPIOLIB_LEGACY' is technically
>> incorrect since they don't need the legayc interfaces, but it
>> would be a temporary workaround until wlf_cragg_6410 is
>> gone.
>
> I've applied the patches for now in the hope that these can get cleaned
> away at one point.
Thanks a lot!
Cleaning these up eventually is definition the idea here, hiding
the interfaces in an #ifdef block should both help catch any
remaining accidental users, and make it trivial to remove the
remnants when they are no longer needed.
Arnd
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2025-09-03 9:27 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-08 15:17 [PATCH 00/21] gpiolib: fence off legacy interfaces Arnd Bergmann
2025-08-08 15:17 ` [PATCH 06/21] x86/olpc: select GPIOLIB_LEGACY Arnd Bergmann
2025-08-12 17:01 ` Borislav Petkov
2025-08-08 15:17 ` [PATCH 08/21] ASoC: add GPIOLIB_LEGACY dependency where needed Arnd Bergmann
2025-08-08 15:17 ` [PATCH 12/21] mfd: arizona: make legacy gpiolib interface optional Arnd Bergmann
2025-09-02 12:44 ` Lee Jones
2025-09-02 13:47 ` Arnd Bergmann
2025-09-03 8:05 ` Lee Jones
2025-09-03 9:26 ` Arnd Bergmann
2025-08-08 15:17 ` [PATCH 13/21] mfd: si476x: add GPIOLIB_LEGACY dependency Arnd Bergmann
2025-08-08 15:18 ` [PATCH 20/21] ASoC: pxa: " Arnd Bergmann
2025-08-11 13:10 ` [PATCH 00/21] gpiolib: fence off legacy interfaces Bartosz Golaszewski
2025-08-12 16:23 ` (subset) " Mark Brown
2025-09-02 12:56 ` Lee Jones
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).