Skip to contentSkip to conversation

treewide: replace linux/gpio.h

PATCH Superseded Arnd Bergmann 10 participants 36 messages Jun 29 – Jul 6

Subsystems (39)

v1 of 2 Superseded 1 of 13 applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover treewide: replace linux/gpio.h

From: Arnd Bergmann <[email protected]>

The linux/gpio.h header used to be the global definition for the gpio interfaces, with 1100 users back in linux-3.17. In linux-7.2, only about 130 of those remain, so this series cleans out the rest.

In each subsystem, we can replace the header either with linux/gpio/consumer.h for users of the modern gpio descriptor interface, or linux/gpio/legacy.h for the few remaining users of the old number based interface.

All patches in this series can get applied independently, so my preference would be for each subsystem maintainer to apply these directly, with the rest going into the gpio tree at some point.

The final patch here obviously needs to wait for all the others to get merged first.

Arnd

Arnd Bergmann (13):
ARM: replace linux/gpio.h inclusions m68k/coldfire: replace linux/gpio.h inclusions
mips: replace linux/gpio.h inclusions
sh: replace linux/gpio.h inclusions
mfd: replace linux/gpio.h inclusions [net-next] net: replace linux/gpio.h inclusions
ASoC: replace linux/gpio.h inclusions
pcmcia: replace linux/gpio.h inclusions
phy: replace linux/gpio.h inclusions
media: replace linux/gpio.h inclusions
Input: matrix_keyboard - replace linux/gpio.h inclusion
gpib: gpio: replace linux/gpio.h inclusion
gpiolib: remove linux/gpio.h

 MAINTAINERS                                   |  1 -
 arch/arm/mach-davinci/da850.c                 |  2 +-
 arch/arm/mach-dove/mpp.c                      |  2 +-
 arch/arm/mach-mv78xx0/buffalo-wxl-setup.c     |  2 +-
 arch/arm/mach-mv78xx0/irq.c                   |  2 +-
 arch/arm/mach-mv78xx0/mpp.c                   |  2 +-
 arch/arm/mach-mvebu/pm.c                      |  2 +-
 arch/arm/mach-mxs/mach-mxs.c                  |  2 +-
 arch/arm/mach-orion5x/board-d2net.c           |  2 +-
 arch/arm/mach-orion5x/board-rd88f5182.c       |  2 +-
 arch/arm/mach-orion5x/dns323-setup.c          |  2 +-
 arch/arm/mach-orion5x/irq.c                   |  2 +-
 arch/arm/mach-orion5x/kurobox_pro-setup.c     |  2 +-
 arch/arm/mach-orion5x/mv2120-setup.c          |  2 +-
 arch/arm/mach-orion5x/net2big-setup.c         |  2 +-
 .../arm/mach-orion5x/terastation_pro2-setup.c |  2 +-
 arch/arm/mach-orion5x/ts209-setup.c           |  2 +-
 arch/arm/mach-orion5x/ts409-setup.c           |  2 +-
 arch/arm/mach-pxa/am200epd.c                  |  2 +-
 arch/arm/mach-pxa/am300epd.c                  |  2 +-
 arch/arm/mach-pxa/generic.c                   |  2 +-
 arch/arm/mach-pxa/gumstix.c                   |  2 +-
 arch/arm/mach-pxa/mfp-pxa2xx.c                |  2 +-
 arch/arm/mach-pxa/pxa25x.c                    |  2 +-
 arch/arm/mach-pxa/pxa27x.c                    |  2 +-
 arch/arm/mach-pxa/reset.c                     |  2 +-
 arch/arm/mach-pxa/sharpsl_pm.c                |  2 +-
 arch/arm/mach-pxa/spitz.c                     |  2 +-
 arch/arm/mach-pxa/spitz_pm.c                  |  2 +-
 arch/arm/mach-s3c/dev-audio-s3c64xx.c         |  2 +-
 arch/arm/mach-s3c/devs.c                      |  2 +-
 arch/arm/mach-s3c/mach-crag6410.c             |  2 +-
 arch/arm/mach-s3c/pm-gpio.c                   |  2 +-
 arch/arm/mach-s3c/pm-s3c64xx.c                |  2 +-
 arch/arm/mach-s3c/setup-fb-24bpp-s3c64xx.c    |  2 +-
 arch/arm/mach-s3c/setup-i2c0-s3c64xx.c        |  2 +-
 arch/arm/mach-s3c/setup-i2c1-s3c64xx.c        |  2 +-
 arch/arm/mach-s3c/setup-keypad-s3c64xx.c      |  2 +-
 arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c  |  2 +-
 arch/arm/mach-s3c/setup-spi-s3c64xx.c         |  2 +-
 arch/arm/mach-sa1100/collie.c                 |  2 +-
 arch/arm/mach-sa1100/generic.c                |  2 +-
 arch/arm/mach-sa1100/h3600.c                  |  2 +-
 arch/arm/mach-sa1100/h3xxx.c                  |  2 +-
 arch/arm/plat-orion/mpp.c                     |  2 +-
 arch/m68k/coldfire/device.c                   |  2 +-
 arch/m68k/include/asm/mcfgpio.h               |  2 +-
 arch/mips/alchemy/board-xxs1500.c             |  2 +-
 arch/mips/alchemy/devboards/db1000.c          |  2 +-
 arch/mips/alchemy/devboards/db1200.c          |  2 +-
 arch/mips/alchemy/devboards/db1550.c          |  2 +-
 arch/mips/bcm47xx/workarounds.c               |  2 +-
 arch/mips/bcm63xx/boards/board_bcm963xx.c     |  1 +
 .../include/asm/mach-bcm63xx/board_bcm963xx.h |  2 +-
 arch/mips/txx9/rbtx4927/setup.c               |  2 +-
 arch/sh/boards/board-magicpanelr2.c           |  2 +-
 arch/sh/boards/board-sh7757lcr.c              |  2 +-
 arch/sh/boards/board-urquell.c                |  2 +-
 arch/sh/boards/mach-ap325rxa/setup.c          |  2 +-
 arch/sh/boards/mach-ecovec24/setup.c          |  2 +-
 .../boards/mach-highlander/pinmux-r7785rp.c   |  2 +-
 arch/sh/boards/mach-kfr2r09/lcd_wqvga.c       |  2 +-
 arch/sh/boards/mach-kfr2r09/setup.c           |  2 +-
 arch/sh/boards/mach-migor/lcd_qvga.c          |  2 +-
 arch/sh/boards/mach-migor/setup.c             |  2 +-
 arch/sh/boards/mach-rsk/devices-rsk7203.c     |  2 +-
 arch/sh/boards/mach-rsk/devices-rsk7269.c     |  1 -
 arch/sh/boards/mach-se/7724/setup.c           |  2 +-
 .../include/mach-common/mach/magicpanelr2.h   |  2 --
 arch/sh/kernel/cpu/sh4a/setup-shx3.c          |  2 +-
 drivers/gpib/gpio/gpib_bitbang.c              |  2 +-
 drivers/gpio/TODO                             |  4 +---
 drivers/gpio/gpiolib-cdev.c                   |  2 +-
 drivers/gpio/gpiolib-legacy.c                 |  3 +--
 drivers/gpio/gpiolib.c                        |  2 +-
 drivers/input/keyboard/matrix_keypad.c        |  2 +-
 drivers/media/pci/ddbridge/ddbridge.h         |  2 +-
 .../platform/samsung/s3c-camif/camif-core.c   |  2 +-
 drivers/media/usb/em28xx/em28xx-dvb.c         |  2 +-
 drivers/mfd/aat2870-core.c                    |  2 +-
 drivers/mfd/arizona-irq.c                     |  2 +-
 drivers/mfd/lp3943.c                          |  2 +-
 drivers/mfd/si476x-cmd.c                      |  2 +-
 drivers/mfd/si476x-i2c.c                      |  2 +-
 drivers/mfd/sm501.c                           |  2 +-
 drivers/mfd/tps6105x.c                        |  2 +-
 drivers/mfd/tps65911-comparator.c             |  2 +-
 drivers/mfd/wm8994-irq.c                      |  2 +-
 drivers/net/dsa/b53/b53_priv.h                |  3 ++-
 drivers/net/dsa/microchip/ksz8.c              |  2 +-
 drivers/net/ethernet/allwinner/sun4i-emac.c   |  2 +-
 .../net/ethernet/apm/xgene/xgene_enet_main.c  |  2 +-
 .../ethernet/oki-semi/pch_gbe/pch_gbe_main.c  |  2 +-
 drivers/net/phy/mdio_device.c                 |  2 +-
 drivers/pcmcia/bcm63xx_pcmcia.c               |  2 +-
 drivers/pcmcia/db1xxx_ss.c                    |  2 +-
 drivers/pcmcia/sa1100_h3600.c                 |  2 +-
 drivers/pcmcia/soc_common.c                   |  2 +-
 drivers/pcmcia/xxs1500_ss.c                   |  2 +-
 drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c     |  2 +-
 drivers/phy/rockchip/phy-rockchip-usbdp.c     |  2 +-
 drivers/phy/ti/phy-j721e-wiz.c                |  2 +-
 include/linux/gpio.h                          | 22 -------------------
 include/linux/mfd/lp3943.h                    |  2 +-
 include/linux/mfd/ti-lmu.h                    |  2 +-
 include/linux/mfd/tps65910.h                  |  2 +-
 include/linux/mfd/ucb1x00.h                   |  2 +-
 sound/soc/codecs/cs42l84.c                    |  2 +-
 sound/soc/codecs/cx2072x.c                    |  2 +-
 sound/soc/codecs/dmic.c                       |  2 +-
 110 files changed, 107 insertions(+), 134 deletions(-)
 delete mode 100644 include/linux/gpio.h
Signature · 35 lines
2.39.5

Cc: Bartosz Golaszewski <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Sebastian Hesselbarth <[email protected]>
Cc: Gregory Clement <[email protected]>
Cc: Frank Li <[email protected]>
Cc: Robert Jarzmik <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Greg Ungerer <[email protected]>
Cc: Thomas Bogendoerfer <[email protected]>
Cc: Hauke Mehrtens <[email protected]>
Cc: "Rafał Miłecki" <[email protected]>
Cc: Yoshinori Sato <[email protected]>
Cc: John Paul Adrian Glaubitz <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Paolo Abeni <[email protected]>
Cc: Dominik Brodowski <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
#1 lore raw

PATCH 1/13 ARM: replace linux/gpio.h inclusions

From: Arnd Bergmann <[email protected]>

linux/gpio.h should no longer be used, convert these instead to either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.

---
 arch/arm/mach-davinci/da850.c                  | 2 +-
 arch/arm/mach-dove/mpp.c                       | 2 +-
 arch/arm/mach-mv78xx0/buffalo-wxl-setup.c      | 2 +-
 arch/arm/mach-mv78xx0/irq.c                    | 2 +-
 arch/arm/mach-mv78xx0/mpp.c                    | 2 +-
 arch/arm/mach-mvebu/pm.c                       | 2 +-
 arch/arm/mach-mxs/mach-mxs.c                   | 2 +-
 arch/arm/mach-orion5x/board-d2net.c            | 2 +-
 arch/arm/mach-orion5x/board-rd88f5182.c        | 2 +-
 arch/arm/mach-orion5x/dns323-setup.c           | 2 +-
 arch/arm/mach-orion5x/irq.c                    | 2 +-
 arch/arm/mach-orion5x/kurobox_pro-setup.c      | 2 +-
 arch/arm/mach-orion5x/mv2120-setup.c           | 2 +-
 arch/arm/mach-orion5x/net2big-setup.c          | 2 +-
 arch/arm/mach-orion5x/terastation_pro2-setup.c | 2 +-
 arch/arm/mach-orion5x/ts209-setup.c            | 2 +-
 arch/arm/mach-orion5x/ts409-setup.c            | 2 +-
 arch/arm/mach-pxa/am200epd.c                   | 2 +-
 arch/arm/mach-pxa/am300epd.c                   | 2 +-
 arch/arm/mach-pxa/generic.c                    | 2 +-
 arch/arm/mach-pxa/gumstix.c                    | 2 +-
 arch/arm/mach-pxa/mfp-pxa2xx.c                 | 2 +-
 arch/arm/mach-pxa/pxa25x.c                     | 2 +-
 arch/arm/mach-pxa/pxa27x.c                     | 2 +-
 arch/arm/mach-pxa/reset.c                      | 2 +-
 arch/arm/mach-pxa/sharpsl_pm.c                 | 2 +-
 arch/arm/mach-pxa/spitz.c                      | 2 +-
 arch/arm/mach-pxa/spitz_pm.c                   | 2 +-
 arch/arm/mach-s3c/dev-audio-s3c64xx.c          | 2 +-
 arch/arm/mach-s3c/devs.c                       | 2 +-
 arch/arm/mach-s3c/mach-crag6410.c              | 2 +-
 arch/arm/mach-s3c/pm-gpio.c                    | 2 +-
 arch/arm/mach-s3c/pm-s3c64xx.c                 | 2 +-
 arch/arm/mach-s3c/setup-fb-24bpp-s3c64xx.c     | 2 +-
 arch/arm/mach-s3c/setup-i2c0-s3c64xx.c         | 2 +-
 arch/arm/mach-s3c/setup-i2c1-s3c64xx.c         | 2 +-
 arch/arm/mach-s3c/setup-keypad-s3c64xx.c       | 2 +-
 arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c   | 2 +-
 arch/arm/mach-s3c/setup-spi-s3c64xx.c          | 2 +-
 arch/arm/mach-sa1100/collie.c                  | 2 +-
 arch/arm/mach-sa1100/generic.c                 | 2 +-
 arch/arm/mach-sa1100/h3600.c                   | 2 +-
 arch/arm/mach-sa1100/h3xxx.c                   | 2 +-
 arch/arm/plat-orion/mpp.c                      | 2 +-
 44 files changed, 44 insertions(+), 44 deletions(-)
arch/arm/mach-davinci/da850.c +1 -1
index 706f8241b5e7..611cce70c5bb 100644
@@ -9,7 +9,7 @@
  * 2009 (c) MontaVista Software, Inc.
  */
 
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/init.h>
 #include <linux/io.h>
 #include <linux/mfd/da8xx-cfgchip.h>
arch/arm/mach-dove/mpp.c +1 -1
index 93cb137da5f8..e41bd473abe9 100644
@@ -6,7 +6,7 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/io.h>
 #include <plat/mpp.h>
 #include <plat/orion-gpio.h>
arch/arm/mach-mv78xx0/buffalo-wxl-setup.c +1 -1
index 62e982f74bc2..3b2e381b7383 100644
@@ -14,7 +14,7 @@
 #include <linux/mv643xx_eth.h>
 #include <linux/ethtool.h>
 #include <linux/i2c.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/gpio_keys.h>
 #include <linux/input.h>
 #include <asm/mach-types.h>
arch/arm/mach-mv78xx0/irq.c +1 -1
index a34b6855fb19..6e42f6446637 100644
@@ -4,7 +4,7 @@
  *
  * MV78xx0 IRQ handling.
  */
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/kernel.h>
 #include <linux/irq.h>
 #include <linux/io.h>
arch/arm/mach-mv78xx0/mpp.c +1 -1
index aff0e612cbba..32bf590d79fe 100644
@@ -4,7 +4,7 @@
  *
  * MPP functions for Marvell MV78x00 SoCs
  */
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/io.h>
arch/arm/mach-mvebu/pm.c +1 -1
index b149d9b77505..616a7fb22d86 100644
@@ -9,7 +9,7 @@
 
 #include <linux/cpu_pm.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/mbus.h>
arch/arm/mach-mxs/mach-mxs.c +1 -1
index f639d5004351..c8231a480052 100644
@@ -9,7 +9,7 @@
 #include <linux/clkdev.h>
 #include <linux/delay.h>
 #include <linux/err.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/init.h>
 #include <linux/reboot.h>
 #include <linux/micrel_phy.h>
arch/arm/mach-orion5x/board-d2net.c +1 -1
index 09bf366d05ff..7cf09da9d9e7 100644
@@ -13,7 +13,7 @@
 #include <linux/pci.h>
 #include <linux/irq.h>
 #include <linux/leds.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/gpio/machine.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
arch/arm/mach-orion5x/board-rd88f5182.c +1 -1
index 1c14e49a90a6..9e2fe74ec68a 100644
@@ -6,7 +6,7 @@
  *
  * Maintainer: Ronen Shitrit <[email protected]>
  */
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/of.h>
arch/arm/mach-orion5x/dns323-setup.c +1 -1
index fcd38ff7ca45..7b81b08b0dda 100644
@@ -13,7 +13,7 @@
  * License, or (at your option) any later version.
  *
  */
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/gpio/machine.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
arch/arm/mach-orion5x/irq.c +1 -1
index e17727e53cb4..689bec1ebe89 100644
@@ -6,7 +6,7 @@
  *
  * Maintainer: Tzachi Perelstein <[email protected]>
  */
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/kernel.h>
 #include <linux/irq.h>
 #include <linux/io.h>
arch/arm/mach-orion5x/kurobox_pro-setup.c +1 -1
index 339b10891808..e61b9ab06943 100644
@@ -4,7 +4,7 @@
  *
  * Maintainer: Ronen Shitrit <[email protected]>
  */
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
arch/arm/mach-orion5x/mv2120-setup.c +1 -1
index 5b0249f109cd..b15fe5b7a0f9 100644
@@ -7,7 +7,7 @@
  * published by the Free Software Foundation; either version 2 of the
  * License, or (at your option) any later version.
  */
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/gpio/machine.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
arch/arm/mach-orion5x/net2big-setup.c +1 -1
index 4afd9b4c71a9..f04571e79805 100644
@@ -17,7 +17,7 @@
 #include <linux/input.h>
 #include <linux/i2c.h>
 #include <linux/ata_platform.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/gpio/machine.h>
 #include <linux/delay.h>
 #include <asm/mach-types.h>
arch/arm/mach-orion5x/terastation_pro2-setup.c +1 -1
index a9f01859d101..c3db3376950a 100644
@@ -4,7 +4,7 @@
  *
  * Maintainer: Sylver Bruneau <[email protected]>
  */
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
arch/arm/mach-orion5x/ts209-setup.c +1 -1
index de9092e992c5..25cd50306c65 100644
@@ -4,7 +4,7 @@
  *
  * Maintainer: Byron Bradley <[email protected]>
  */
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
arch/arm/mach-orion5x/ts409-setup.c +1 -1
index 725688aa5cba..f92acef0b45f 100644
@@ -7,7 +7,7 @@
  * Copyright (C) 2008  Sylver Bruneau <[email protected]>
  * Copyright (C) 2008  Martin Michlmayr <[email protected]>
  */
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/gpio/machine.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
arch/arm/mach-pxa/am200epd.c +1 -1
index cac0bb09db14..4814f3cfe775 100644
@@ -28,7 +28,7 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/irq.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 
 #include "pxa25x.h"
 #include "gumstix.h"
arch/arm/mach-pxa/am300epd.c +1 -1
index 4b55bc89db8f..435fb72da7de 100644
@@ -26,7 +26,7 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/irq.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 
 #include "gumstix.h"
 #include "mfp-pxa25x.h"
arch/arm/mach-pxa/generic.c +1 -1
index 02fdde7e3e34..f181e7b7c6be 100644
@@ -13,7 +13,7 @@
  * initialization stuff for PXA machines which can be overridden later if
  * need be.
  */
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
arch/arm/mach-pxa/gumstix.c +1 -1
index 6074815a4bca..7ab0cb015d1b 100644
@@ -22,7 +22,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/gpio/machine.h>
 #include <linux/gpio/property.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/err.h>
 #include <linux/clk.h>
 
arch/arm/mach-pxa/mfp-pxa2xx.c +1 -1
index d1347055fbe4..566fb4e2adba 100644
@@ -9,7 +9,7 @@
  *  on PXA3xx,  what's more important, the low power pin state and
  *  wakeup detection are also supported by the same framework.
  */
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/gpio-pxa.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
arch/arm/mach-pxa/pxa25x.c +1 -1
index a4e878be004a..a273f0af095e 100644
@@ -15,7 +15,7 @@
  */
 #include <linux/dmaengine.h>
 #include <linux/dma/pxa-dma.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/gpio-pxa.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
arch/arm/mach-pxa/pxa27x.c +1 -1
index 1d34de7e5fbe..814e0a12f38a 100644
@@ -10,7 +10,7 @@
  */
 #include <linux/dmaengine.h>
 #include <linux/dma/pxa-dma.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/gpio-pxa.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
arch/arm/mach-pxa/reset.c +1 -1
index 27293549f8ad..49d2e46a1fae 100644
@@ -2,7 +2,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/io.h>
 #include <asm/proc-fns.h>
 #include <asm/system_misc.h>
arch/arm/mach-pxa/sharpsl_pm.c +1 -1
index 71b282b146d0..a611eea70e5a 100644
@@ -19,7 +19,7 @@
 #include <linux/delay.h>
 #include <linux/leds.h>
 #include <linux/suspend.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/io.h>
 
 #include <asm/mach-types.h>
arch/arm/mach-pxa/spitz.c +1 -1
index 5091b601c4e1..5eaf38243b9e 100644
@@ -12,7 +12,7 @@
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/gpio_keys.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/gpio/machine.h>
 #include <linux/gpio/property.h>
 #include <linux/leds.h>
arch/arm/mach-pxa/spitz_pm.c +1 -1
index 03b4b347f11a..806847c36549 100644
@@ -10,7 +10,7 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/gpio-pxa.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
arch/arm/mach-s3c/dev-audio-s3c64xx.c +1 -1
index 7ce119dc3a72..8884374dbcdc 100644
@@ -7,7 +7,7 @@
 #include <linux/string.h>
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/export.h>
 
 #include "irqs.h"
arch/arm/mach-s3c/devs.c +1 -1
index bab2abd8a34a..572b156644bd 100644
@@ -5,7 +5,7 @@
 //
 // Base Samsung platform device definitions
 
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
arch/arm/mach-s3c/mach-crag6410.c +1 -1
index c4040aad1ed3..57176719d8a6 100644
@@ -15,7 +15,7 @@
 #include <linux/io.h>
 #include <linux/init.h>
 #include <linux/input-event-codes.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/gpio/machine.h>
 #include <linux/leds.h>
 #include <linux/delay.h>
arch/arm/mach-s3c/pm-gpio.c +1 -1
index cfdbc2337998..fd5897cc26c7 100644
@@ -11,7 +11,7 @@
 #include <linux/device.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 
 #include "gpio-samsung.h"
 
arch/arm/mach-s3c/pm-s3c64xx.c +1 -1
index 284d5f462513..a73b8bd12949 100644
@@ -11,7 +11,7 @@
 #include <linux/suspend.h>
 #include <linux/serial_core.h>
 #include <linux/io.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/pm_domain.h>
 
 #include "map.h"
arch/arm/mach-s3c/setup-fb-24bpp-s3c64xx.c +1 -1
index c3269cd6a848..20ae926e12db 100644
@@ -9,7 +9,7 @@
 
 #include <linux/kernel.h>
 #include <linux/types.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 
 #include "fb.h"
 #include "gpio-cfg.h"
arch/arm/mach-s3c/setup-i2c0-s3c64xx.c +1 -1
index a6ef8d2bc995..520e97dc8754 100644
@@ -9,7 +9,7 @@
 
 #include <linux/kernel.h>
 #include <linux/types.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 
 struct platform_device; /* don't need the contents */
 
arch/arm/mach-s3c/setup-i2c1-s3c64xx.c +1 -1
index 0fe37363d26e..26f7ae455328 100644
@@ -9,7 +9,7 @@
 
 #include <linux/kernel.h>
 #include <linux/types.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 
 struct platform_device; /* don't need the contents */
 
arch/arm/mach-s3c/setup-keypad-s3c64xx.c +1 -1
index 8463ad37c6ab..2e1367878fb1 100644
@@ -5,7 +5,7 @@
 //
 // GPIO configuration for S3C64XX KeyPad device
 
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include "gpio-cfg.h"
 #include "keypad.h"
 #include "gpio-samsung.h"
arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c +1 -1
index 646ff949acd5..728b66f80493 100644
@@ -11,7 +11,7 @@
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 
 #include "gpio-cfg.h"
 #include "sdhci.h"
arch/arm/mach-s3c/setup-spi-s3c64xx.c +1 -1
index 497aff71c29c..8d15b13ed7d5 100644
@@ -3,7 +3,7 @@
 // Copyright (C) 2011 Samsung Electronics Ltd.
 //		http://www.samsung.com/
 
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/platform_data/spi-s3c64xx.h>
 #include "gpio-cfg.h"
 #include "gpio-samsung.h"
arch/arm/mach-sa1100/collie.c +1 -1
index 466d755d5702..af9c68b2093e 100644
@@ -29,7 +29,7 @@
 #include <linux/timer.h>
 #include <linux/gpio_keys.h>
 #include <linux/input.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/gpio/machine.h>
 #include <linux/power/gpio-charger.h>
 
arch/arm/mach-sa1100/generic.c +1 -1
index 99ff55e8131d..a995625ab1a0 100644
@@ -6,7 +6,7 @@
  *
  * Code common to all SA11x0 machines.
  */
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/gpio/machine.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
arch/arm/mach-sa1100/h3600.c +1 -1
index 1cfc0b1fa41c..59e9251a138e 100644
@@ -8,7 +8,7 @@
 
 #include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 
 #include <video/sa1100fb.h>
 
arch/arm/mach-sa1100/h3xxx.c +1 -1
index d685f03f51f3..b8fc1953db9f 100644
@@ -8,7 +8,7 @@
 
 #include <linux/kernel.h>
 #include <linux/gpio/machine.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/gpio_keys.h>
 #include <linux/input.h>
 #include <linux/mtd/mtd.h>
arch/arm/plat-orion/mpp.c +1 -1
index 8a6880d528b6..673ecedc721d 100644
@@ -12,7 +12,7 @@
 #include <linux/init.h>
 #include <linux/mbus.h>
 #include <linux/io.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <plat/orion-gpio.h>
 #include <plat/mpp.h>
 
Signature · 1 line
2.39.5
#2 lore raw

PATCH 2/13 m68k/coldfire: replace linux/gpio.h inclusions

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

linux/gpio.h should no longer be used, convert these instead to linux/gpio/legacy.h for coldfire.

---
 arch/m68k/coldfire/device.c     | 2 +-
 arch/m68k/include/asm/mcfgpio.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/m68k/coldfire/device.c +1 -1
index 1420bae0964f..9a0258acd998 100644
@@ -12,7 +12,7 @@
 #include <linux/init.h>
 #include <linux/io.h>
 #include <linux/spi/spi.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/fec.h>
 #include <linux/dmaengine.h>
 #include <asm/traps.h>
arch/m68k/include/asm/mcfgpio.h +1 -1
index 7103cfa4edb6..29726aa40eb6 100644
@@ -16,7 +16,7 @@ int __mcfgpio_request(unsigned gpio);
 void __mcfgpio_free(unsigned gpio);
 
 #ifdef CONFIG_GPIOLIB
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #else
 
 /* our alternate 'gpiolib' functions */
Signature · 1 line
2.39.5
maintainer Reviewed-by on v1 2/13
#3 lore raw

Re: [PATCH 02/13] m68k/coldfire: replace linux/gpio.h inclusions

Hi Arnd,

Quoted 6 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

linux/gpio.h should no longer be used, convert these instead to linux/gpio/legacy.h for coldfire.

For the ColdFire changes, LGTM:

Regards
Greg

Quoted 31 lines
---
  arch/m68k/coldfire/device.c     | 2 +-
  arch/m68k/include/asm/mcfgpio.h | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
arch/m68k/coldfire/device.c +1 -1
index 1420bae0964f..9a0258acd998 100644
@@ -12,7 +12,7 @@
  #include <linux/init.h>
  #include <linux/io.h>
  #include <linux/spi/spi.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
  #include <linux/fec.h>
  #include <linux/dmaengine.h>
  #include <asm/traps.h>
arch/m68k/include/asm/mcfgpio.h +1 -1
index 7103cfa4edb6..29726aa40eb6 100644
@@ -16,7 +16,7 @@ int __mcfgpio_request(unsigned gpio);
  void __mcfgpio_free(unsigned gpio);
 
  #ifdef CONFIG_GPIOLIB
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
  #else
 
  /* our alternate 'gpiolib' functions */
#4 lore raw

PATCH 3/13 mips: replace linux/gpio.h inclusions

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

linux/gpio.h should no longer be used, convert these instead to either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.

---
 arch/mips/alchemy/board-xxs1500.c                   | 2 +-
 arch/mips/alchemy/devboards/db1000.c                | 2 +-
 arch/mips/alchemy/devboards/db1200.c                | 2 +-
 arch/mips/alchemy/devboards/db1550.c                | 2 +-
 arch/mips/bcm47xx/workarounds.c                     | 2 +-
 arch/mips/bcm63xx/boards/board_bcm963xx.c           | 1 +
 arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 2 +-
 arch/mips/txx9/rbtx4927/setup.c                     | 2 +-
 8 files changed, 8 insertions(+), 7 deletions(-)
arch/mips/alchemy/board-xxs1500.c +1 -1
index f175bce2987f..a03762dde4e7 100644
@@ -11,7 +11,7 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/delay.h>
 #include <linux/pm.h>
 #include <asm/bootinfo.h>
arch/mips/alchemy/devboards/db1000.c +1 -1
index 8fb24b220e3a..5eff34a8683b 100644
@@ -8,7 +8,7 @@
 
 #include <linux/clk.h>
 #include <linux/dma-mapping.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/gpio/machine.h>
 #include <linux/gpio/property.h>
 #include <linux/init.h>
arch/mips/alchemy/devboards/db1200.c +1 -1
index de2a9083ed9a..539b311fc8af 100644
@@ -7,7 +7,7 @@
 
 #include <linux/clk.h>
 #include <linux/dma-mapping.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/i2c.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
arch/mips/alchemy/devboards/db1550.c +1 -1
index b8295a5c2e9a..579fc8f1eaed 100644
@@ -7,7 +7,7 @@
 
 #include <linux/clk.h>
 #include <linux/dma-mapping.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/i2c.h>
 #include <linux/init.h>
 #include <linux/io.h>
arch/mips/bcm47xx/workarounds.c +1 -1
index 745c6228eb2c..dc9e5483347d 100644
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 #include "bcm47xx_private.h"
 
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <bcm47xx_board.h>
 #include <bcm47xx.h>
 
arch/mips/bcm63xx/boards/board_bcm963xx.c +1 -0
index c5617b889b1c..71628dac6c26 100644
@@ -7,6 +7,7 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/init.h>
+#include <linux/gpio/legacy.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/platform_device.h>
arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h +1 -1
index 830f53f28e3f..428cf4508f9a 100644
@@ -3,7 +3,7 @@
 #define BOARD_BCM963XX_H_
 
 #include <linux/types.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/leds.h>
 #include <bcm63xx_dev_enet.h>
 #include <bcm63xx_dev_usb_usbd.h>
arch/mips/txx9/rbtx4927/setup.c +1 -1
index 31955c1d5555..b4fbe6a2a73a 100644
@@ -48,7 +48,7 @@
 #include <linux/ioport.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/leds.h>
 #include <asm/io.h>
 #include <asm/reboot.h>
Signature · 1 line
2.39.5
Reviewed-by on v1 3/13
#5 lore raw

Re: [PATCH 03/13] mips: replace linux/gpio.h inclusions

Quoted 6 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

linux/gpio.h should no longer be used, convert these instead to either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.

Quoted 10 lines
---
  arch/mips/alchemy/board-xxs1500.c                   | 2 +-
  arch/mips/alchemy/devboards/db1000.c                | 2 +-
  arch/mips/alchemy/devboards/db1200.c                | 2 +-
  arch/mips/alchemy/devboards/db1550.c                | 2 +-
  arch/mips/bcm47xx/workarounds.c                     | 2 +-
  arch/mips/bcm63xx/boards/board_bcm963xx.c           | 1 +
  arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 2 +-
  arch/mips/txx9/rbtx4927/setup.c                     | 2 +-
  8 files changed, 8 insertions(+), 7 deletions(-)
#6 lore raw

PATCH 4/13 sh: replace linux/gpio.h inclusions

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

linux/gpio.h should no longer be used, convert these instead to linux/gpio/legacy.h for the sh boards using the legacy interfaces, or remove it where it is not needed at all.

---
 arch/sh/boards/board-magicpanelr2.c             | 2 +-
 arch/sh/boards/board-sh7757lcr.c                | 2 +-
 arch/sh/boards/board-urquell.c                  | 2 +-
 arch/sh/boards/mach-ap325rxa/setup.c            | 2 +-
 arch/sh/boards/mach-ecovec24/setup.c            | 2 +-
 arch/sh/boards/mach-highlander/pinmux-r7785rp.c | 2 +-
 arch/sh/boards/mach-kfr2r09/lcd_wqvga.c         | 2 +-
 arch/sh/boards/mach-kfr2r09/setup.c             | 2 +-
 arch/sh/boards/mach-migor/lcd_qvga.c            | 2 +-
 arch/sh/boards/mach-migor/setup.c               | 2 +-
 arch/sh/boards/mach-rsk/devices-rsk7203.c       | 2 +-
 arch/sh/boards/mach-rsk/devices-rsk7269.c       | 1 -
 arch/sh/boards/mach-se/7724/setup.c             | 2 +-
 arch/sh/include/mach-common/mach/magicpanelr2.h | 2 --
 arch/sh/kernel/cpu/sh4a/setup-shx3.c            | 2 +-
 15 files changed, 13 insertions(+), 16 deletions(-)
arch/sh/boards/board-magicpanelr2.c +1 -1
index 75de893152af..3f14118a1015 100644
@@ -10,7 +10,7 @@
 #include <linux/irq.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 #include <linux/smsc911x.h>
arch/sh/boards/board-sh7757lcr.c +1 -1
index bca54e489e11..6d18f59ef261 100644
@@ -7,7 +7,7 @@
 
 #include <linux/init.h>
 #include <linux/platform_device.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/irq.h>
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
arch/sh/boards/board-urquell.c +1 -1
index dad2b3b40735..1f73c04d341f 100644
@@ -14,7 +14,7 @@
 #include <linux/smc91x.h>
 #include <linux/mtd/physmap.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/irq.h>
 #include <linux/clk.h>
 #include <linux/sh_intc.h>
arch/sh/boards/mach-ap325rxa/setup.c +1 -1
index bb5004a8ac02..17c3f568d92e 100644
@@ -17,7 +17,7 @@
 #include <linux/clkdev.h>
 #include <linux/delay.h>
 #include <linux/device.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/gpio/consumer.h>
 #include <linux/gpio/machine.h>
 #include <linux/i2c.h>
arch/sh/boards/mach-ecovec24/setup.c +1 -1
index a641e26f8fdf..ca4b4dd1ddef 100644
@@ -20,7 +20,7 @@
 #include <linux/mmc/host.h>
 #include <linux/platform_data/sh_mmcif.h>
 #include <linux/mtd/physmap.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/gpio/machine.h>
 #include <linux/platform_data/gpio_backlight.h>
 #include <linux/platform_data/tmio.h>
arch/sh/boards/mach-highlander/pinmux-r7785rp.c +1 -1
index 689bd8732d9e..3a1057ee9ace 100644
@@ -3,7 +3,7 @@
  * Copyright (C) 2008 Paul Mundt
  */
 #include <linux/init.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <cpu/sh7785.h>
 #include <mach/highlander.h>
 
arch/sh/boards/mach-kfr2r09/lcd_wqvga.c +1 -1
index f6bbac106d13..68716660de34 100644
@@ -14,7 +14,7 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <video/sh_mobile_lcdc.h>
 #include <mach/kfr2r09.h>
 #include <cpu/sh7724.h>
arch/sh/boards/mach-kfr2r09/setup.c +1 -1
index 70236859919d..30dd7dae7906 100644
@@ -14,7 +14,7 @@
 
 #include <linux/clkdev.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/gpio/machine.h>
 #include <linux/i2c.h>
 #include <linux/init.h>
arch/sh/boards/mach-migor/lcd_qvga.c +1 -1
index 4ebf130510bc..f72934e370fd 100644
@@ -14,7 +14,7 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <video/sh_mobile_lcdc.h>
 #include <cpu/sh7722.h>
 #include <mach/migor.h>
arch/sh/boards/mach-migor/setup.c +1 -1
index 1853e6319a66..b0198e7cb9ab 100644
@@ -22,7 +22,7 @@
 #include <linux/smc91x.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/gpio/machine.h>
 #include <linux/videodev2.h>
 #include <linux/sh_intc.h>
arch/sh/boards/mach-rsk/devices-rsk7203.c +1 -1
index e6b05d4588b7..eb56b57812bd 100644
@@ -10,7 +10,7 @@
 #include <linux/interrupt.h>
 #include <linux/smsc911x.h>
 #include <linux/input.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/gpio_keys.h>
 #include <linux/leds.h>
 #include <asm/machvec.h>
arch/sh/boards/mach-rsk/devices-rsk7269.c +0 -1
index 4b1e386b51dd..54edd9958eca 100644
@@ -11,7 +11,6 @@
 #include <linux/interrupt.h>
 #include <linux/input.h>
 #include <linux/smsc911x.h>
-#include <linux/gpio.h>
 #include <asm/machvec.h>
 #include <asm/io.h>
 
arch/sh/boards/mach-se/7724/setup.c +1 -1
index e500feb91053..bed8f44fcecb 100644
@@ -15,7 +15,7 @@
 
 #include <linux/delay.h>
 #include <linux/device.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/init.h>
 #include <linux/input.h>
 #include <linux/input/sh_keysc.h>
arch/sh/include/mach-common/mach/magicpanelr2.h +0 -2
index c2d218cea74b..29d86dd21b7b 100644
@@ -10,8 +10,6 @@
 #ifndef __ASM_SH_MAGICPANELR2_H
 #define __ASM_SH_MAGICPANELR2_H
 
-#include <linux/gpio.h>
-
 #define __IO_PREFIX mpr2
 #include <asm/io_generic.h>
 
arch/sh/kernel/cpu/sh4a/setup-shx3.c +1 -1
index 7014d6d199b3..60be8dca54f6 100644
@@ -9,7 +9,7 @@
 #include <linux/serial.h>
 #include <linux/serial_sci.h>
 #include <linux/io.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/sh_timer.h>
 #include <linux/sh_intc.h>
 #include <cpu/shx3.h>
Signature · 1 line
2.39.5
Reviewed-by on v1 4/13
#7 lore raw

Re: [PATCH 04/13] sh: replace linux/gpio.h inclusions

Quoted 16 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

linux/gpio.h should no longer be used, convert these instead to linux/gpio/legacy.h for the sh boards using the legacy interfaces, or remove it where it is not needed at all.

---
  arch/sh/boards/board-magicpanelr2.c             | 2 +-
  arch/sh/boards/board-sh7757lcr.c                | 2 +-
  arch/sh/boards/board-urquell.c                  | 2 +-
  arch/sh/boards/mach-ap325rxa/setup.c            | 2 +-
  arch/sh/boards/mach-ecovec24/setup.c            | 2 +-
  arch/sh/boards/mach-highlander/pinmux-r7785rp.c | 2 +-
  arch/sh/boards/mach-kfr2r09/lcd_wqvga.c         | 2 +-
  arch/sh/boards/mach-kfr2r09/setup.c             | 2 +-
Quoted 8 lines
  arch/sh/boards/mach-migor/lcd_qvga.c            | 2 +-
  arch/sh/boards/mach-migor/setup.c               | 2 +-
  arch/sh/boards/mach-rsk/devices-rsk7203.c       | 2 +-
  arch/sh/boards/mach-rsk/devices-rsk7269.c       | 1 -
  arch/sh/boards/mach-se/7724/setup.c             | 2 +-
  arch/sh/include/mach-common/mach/magicpanelr2.h | 2 --
  arch/sh/kernel/cpu/sh4a/setup-shx3.c            | 2 +-
  15 files changed, 13 insertions(+), 16 deletions(-)
#8 lore raw

PATCH 5/13 mfd: replace linux/gpio.h inclusions

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

linux/gpio.h should no longer be used, convert these instead to either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.

---
 drivers/mfd/aat2870-core.c        | 2 +-
 drivers/mfd/arizona-irq.c         | 2 +-
 drivers/mfd/lp3943.c              | 2 +-
 drivers/mfd/si476x-cmd.c          | 2 +-
 drivers/mfd/si476x-i2c.c          | 2 +-
 drivers/mfd/sm501.c               | 2 +-
 drivers/mfd/tps6105x.c            | 2 +-
 drivers/mfd/tps65911-comparator.c | 2 +-
 drivers/mfd/wm8994-irq.c          | 2 +-
 include/linux/mfd/lp3943.h        | 2 +-
 include/linux/mfd/ti-lmu.h        | 2 +-
 include/linux/mfd/tps65910.h      | 2 +-
 include/linux/mfd/ucb1x00.h       | 2 +-
 13 files changed, 13 insertions(+), 13 deletions(-)
drivers/mfd/aat2870-core.c +1 -1
index 34d66ba9646a..0d56cd6fbc6a 100644
@@ -13,7 +13,7 @@
 #include <linux/uaccess.h>
 #include <linux/i2c.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/mfd/core.h>
 #include <linux/mfd/aat2870.h>
 #include <linux/regulator/machine.h>
drivers/mfd/arizona-irq.c +1 -1
index 544016d420fe..14f9cb2c4b67 100644
@@ -8,7 +8,7 @@
  */
 
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/irqdomain.h>
drivers/mfd/lp3943.c +1 -1
index 6764553147e4..1918b5c7a5e7 100644
@@ -28,7 +28,7 @@
  */
 
 #include <linux/err.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/i2c.h>
 #include <linux/mfd/core.h>
 #include <linux/mfd/lp3943.h>
drivers/mfd/si476x-cmd.c +1 -1
index 3bb2decfebd3..8cbc0a386f3f 100644
@@ -15,7 +15,7 @@
 #include <linux/atomic.h>
 #include <linux/i2c.h>
 #include <linux/device.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/videodev2.h>
 
 #include <linux/mfd/si476x-core.h>
drivers/mfd/si476x-i2c.c +1 -1
index 7ddc97dfc940..7be3460b0491 100644
@@ -13,7 +13,7 @@
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/regulator/consumer.h>
 #include <linux/i2c.h>
 #include <linux/err.h>
drivers/mfd/sm501.c +1 -1
index b5bda477ebfc..9d5bb67e8084 100644
@@ -35,7 +35,7 @@ struct sm501_device {
 struct sm501_gpio;
 
 #ifdef CONFIG_MFD_SM501_GPIO
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 
 struct sm501_gpio_chip {
 	struct gpio_chip	gpio;
drivers/mfd/tps6105x.c +1 -1
index e2f6858d101e..b11cd2c03311 100644
@@ -16,7 +16,7 @@
 #include <linux/init.h>
 #include <linux/i2c.h>
 #include <linux/regmap.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/spinlock.h>
 #include <linux/slab.h>
 #include <linux/err.h>
drivers/mfd/tps65911-comparator.c +1 -1
index 7098712ea008..cc8545a972bc 100644
@@ -14,7 +14,7 @@
 #include <linux/err.h>
 #include <linux/platform_device.h>
 #include <linux/debugfs.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/mfd/tps65910.h>
 
 #define COMP1					0
drivers/mfd/wm8994-irq.c +1 -1
index a46cea948763..a15483489b9d 100644
@@ -9,7 +9,7 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/i2c.h>
 #include <linux/irq.h>
 #include <linux/mfd/core.h>
include/linux/mfd/lp3943.h +1 -1
index 402f01078fcc..5d2d172d3598 100644
@@ -10,7 +10,7 @@
 #ifndef __MFD_LP3943_H__
 #define __MFD_LP3943_H__
 
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/regmap.h>
 
 /* Registers */
include/linux/mfd/ti-lmu.h +1 -1
index 0bc0e8199798..5040c7d1e1b9 100644
@@ -10,7 +10,7 @@
 #ifndef __MFD_TI_LMU_H__
 #define __MFD_TI_LMU_H__
 
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/notifier.h>
 #include <linux/regmap.h>
 #include <linux/gpio/consumer.h>
include/linux/mfd/tps65910.h +1 -1
index f67ef0a4e041..3813fc9c2b55 100644
@@ -12,7 +12,7 @@
 #ifndef __LINUX_MFD_TPS65910_H
 #define __LINUX_MFD_TPS65910_H
 
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/regmap.h>
 
 /* TPS chip id list */
include/linux/mfd/ucb1x00.h +1 -1
index ede237384723..4ad54e22ed33 100644
@@ -9,7 +9,7 @@
 
 #include <linux/device.h>
 #include <linux/mfd/mcp.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/gpio/driver.h>
 #include <linux/mutex.h>
 
Signature · 1 line
2.39.5
#9 lore raw

Re: [PATCH 05/13] mfd: replace linux/gpio.h inclusions

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The patch introduces a duplicate `#include <linux/gpio/consumer.h>` in…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch introduces a duplicate #include <linux/gpio/consumer.h> in include/linux/mfd/ti-lmu.h. --

commit 19751af1f4af7549cf9f140e38427847c8babbd4
Author: Arnd Bergmann <[email protected]>

mfd: replace linux/gpio.h inclusions

This commit replaces the deprecated linux/gpio.h inclusion across various MFD drivers and headers, converting them to use either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.

[ ... ]

include/linux/mfd/ti-lmu.h line 16

Quoted 13 lines
include/linux/mfd/ti-lmu.h +1 -1
index 0bc0e81997987..5040c7d1e1b92 100644
@@ -10,7 +10,7 @@
 #ifndef __MFD_TI_LMU_H__
 #define __MFD_TI_LMU_H__
 
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/notifier.h>
 #include <linux/regmap.h>
 #include <linux/gpio/consumer.h>

[Severity: Low]
This isn't a bug, but <linux/gpio/consumer.h> is now included twice. Would it be better to just drop the replaced include here since the consumer header is already present a few lines below?

[ ... ]

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
Reviewed-by on v1 5/13
#10 lore raw

Re: [PATCH 05/13] mfd: replace linux/gpio.h inclusions

In reply to Arnd Bergmann
Quoted 9 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

linux/gpio.h should no longer be used, convert these instead to either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.

---
 drivers/mfd/arizona-irq.c         | 2 +-
 drivers/mfd/wm8994-irq.c          | 2 +-

For the wolfson bits:

Thanks,
Charles

#11 lore raw

PATCH 6/13 net: replace linux/gpio.h inclusions

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

linux/gpio.h should no longer be used, change these in drivers/net to linux/gpio/consumer.h where possible, with b53 being the only one still using linux/gpio/legacy.h.

---
 drivers/net/dsa/b53/b53_priv.h                       | 3 ++-
 drivers/net/dsa/microchip/ksz8.c                     | 2 +-
 drivers/net/ethernet/allwinner/sun4i-emac.c          | 2 +-
 drivers/net/ethernet/apm/xgene/xgene_enet_main.c     | 2 +-
 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 2 +-
 drivers/net/phy/mdio_device.c                        | 2 +-
 6 files changed, 7 insertions(+), 6 deletions(-)
drivers/net/dsa/b53/b53_priv.h +2 -1
index cd27a7344e89..29cca7945df7 100644
@@ -23,6 +23,7 @@
 #include <linux/mutex.h>
 #include <linux/phylink.h>
 #include <linux/etherdevice.h>
+#include <linux/gpio/consumer.h>
 #include <net/dsa.h>
 
 #include "b53_regs.h"
@@ -467,7 +468,7 @@ static inline void b53_arl_search_read(struct b53_device *dev, u8 idx,
 #ifdef CONFIG_BCM47XX
 
 #include <linux/bcm47xx_nvram.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <bcm47xx_board.h>
 static inline struct gpio_desc *b53_switch_get_reset_gpio(struct b53_device *dev)
 {
drivers/net/dsa/microchip/ksz8.c +1 -1
index 138f2ab0774e..586916570a84 100644
@@ -18,7 +18,7 @@
 #include <linux/delay.h>
 #include <linux/dsa/ksz_common.h>
 #include <linux/export.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/if_vlan.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
drivers/net/ethernet/allwinner/sun4i-emac.c +1 -1
index fc7341a5cbb7..42174249ef61 100644
@@ -15,7 +15,7 @@
 #include <linux/clk.h>
 #include <linux/etherdevice.h>
 #include <linux/ethtool.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/mii.h>
drivers/net/ethernet/apm/xgene/xgene_enet_main.c +1 -1
index 3b2951030a38..507db46daf2b 100644
@@ -7,7 +7,7 @@
  *	    Keyur Chudgar <[email protected]>
  */
 
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include "xgene_enet_main.h"
 #include "xgene_enet_hw.h"
 #include "xgene_enet_sgmac.h"
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +1 -1
index 48b94ce77490..88c5c52e0e38 100644
@@ -16,7 +16,7 @@
 #include <linux/net_tstamp.h>
 #include <linux/ptp_classify.h>
 #include <linux/ptp_pch.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 
 #define PCH_GBE_MAR_ENTRIES		16
 #define PCH_GBE_SHORT_PKT		64
drivers/net/phy/mdio_device.c +1 -1
index 56080d3d2d25..a18263d5bb02 100644
@@ -8,7 +8,7 @@
 
 #include <linux/delay.h>
 #include <linux/errno.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/gpio/consumer.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
Signature · 1 line
2.39.5
#12 lore raw

Re: [PATCH 06/13] [net-next] net: replace linux/gpio.h inclusions

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Duplicate inclusion of `<linux/gpio/consumer.h>` caused by an unchecked find-and-replace. --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Duplicate inclusion of <linux/gpio/consumer.h> caused by an unchecked find-and-replace. --

commit cb55ce48e23e6753d04ac5f664585feb999f1fcd
Author: Arnd Bergmann <[email protected]>

net: replace linux/gpio.h inclusions

This commit replaces obsolete linux/gpio.h includes with linux/gpio/consumer.h or linux/gpio/legacy.h across various network drivers where possible.

drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c line 19

Quoted 10 lines
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +1 -1
index 48b94ce774906..88c5c52e0e381 100644
@@ -16,7 +16,7 @@
 #include <linux/net_tstamp.h>
 #include <linux/ptp_classify.h>
 #include <linux/ptp_pch.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>

[Severity: Low]
Does this create a duplicate include in pch_gbe_main.c?

Since linux/gpio/consumer.h is already included earlier in the file alongside linux/gpio/machine.h, changing this include results in it being included twice. Can this replaced include simply be removed?

Quoted 2 lines
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +0 -0
 #define PCH_GBE_MAR_ENTRIES		16

[ ... ]

drivers/net/phy/mdio_device.c line 12

Quoted 11 lines
drivers/net/phy/mdio_device.c +1 -1
index 56080d3d2d25e..a18263d5bb029 100644
@@ -8,7 +8,7 @@
 
 #include <linux/delay.h>
 #include <linux/errno.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/gpio/consumer.h>

[Severity: Low]
Did the automated replacement result in consecutive duplicate includes here?

It looks like mdio_device.c already included linux/gpio/consumer.h right below the old linux/gpio.h include. Should we just drop the old include entirely instead of replacing it?

Quoted 2 lines
drivers/net/phy/mdio_device.c +0 -0
 #include <linux/init.h>
 #include <linux/interrupt.h>
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=6
#13 lore raw

PATCH 7/13 ASoC: replace linux/gpio.h inclusions

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

linux/gpio.h is going away,s o use linux/gpio/consumer.h instead.

---
 sound/soc/codecs/cs42l84.c | 2 +-
 sound/soc/codecs/cx2072x.c | 2 +-
 sound/soc/codecs/dmic.c    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/cs42l84.c +1 -1
index f2a58163de0e..36c3abc21fed 100644
@@ -16,7 +16,7 @@
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/i2c.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
 #include <linux/acpi.h>
sound/soc/codecs/cx2072x.c +1 -1
index 83c6cbd40804..0dd35fa86cc5 100644
@@ -11,7 +11,7 @@
 #include <linux/acpi.h>
 #include <linux/clk.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/init.h>
 #include <linux/i2c.h>
 #include <linux/module.h>
sound/soc/codecs/dmic.c +1 -1
index 61e1bf1b3c9e..8b05d6f9b429 100644
@@ -6,7 +6,7 @@
  */
 
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/gpio/consumer.h>
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
Signature · 1 line
2.39.5
#14 lore raw

Re: [PATCH 07/13] ASoC: replace linux/gpio.h inclusions

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The patch introduces duplicate `#include <linux/gpio/consumer.h>` directives in `cs42l84.c` and…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch introduces duplicate #include <linux/gpio/consumer.h> directives in cs42l84.c and dmic.c. --

commit 5e88ad9a5863dbafbe414c688b31a85827de20da
Author: Arnd Bergmann <[email protected]>

ASoC: replace linux/gpio.h inclusions

This commit updates multiple ASoC codecs to use linux/gpio/consumer.h instead of the deprecated linux/gpio.h header.

sound/soc/codecs/cs42l84.c line 19

Quoted 10 lines
sound/soc/codecs/cs42l84.c +1 -1
index f2a58163de0ed..36c3abc21fedc 100644
@@ -16,7 +16,7 @@
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/i2c.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>

[Severity: Low]
This isn't a bug, but does this create a duplicate include? It appears linux/gpio/consumer.h is already included further down in this file. Could we simply drop the linux/gpio.h include entirely?

Quoted 3 lines
sound/soc/codecs/cs42l84.c +0 -0
 #include <linux/regmap.h>
 #include <linux/slab.h>
 #include <linux/acpi.h>

[ ... ]

sound/soc/codecs/dmic.c line 10

Quoted 11 lines
sound/soc/codecs/dmic.c +1 -1
index 61e1bf1b3c9e6..8b05d6f9b429b 100644
@@ -6,7 +6,7 @@
  */
 
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/gpio/consumer.h>

[Severity: Low]
This isn't a bug, but should we just delete the old include line? Replacing it leaves two identical includes back-to-back.

Quoted 2 lines
sound/soc/codecs/dmic.c +0 -0
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=7
Reviewed-by on v1 7/13
#15 lore raw

Re: [PATCH 07/13] ASoC: replace linux/gpio.h inclusions

In reply to Arnd Bergmann
Quoted 8 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

linux/gpio.h is going away,s o use linux/gpio/consumer.h instead.

---
 sound/soc/codecs/cs42l84.c | 2 +-
 sound/soc/codecs/cx2072x.c | 2 +-

For the Cirrus bits:

Thanks,
Charles

Signature · 3 lines
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
#16 lore raw

PATCH 8/13 pcmcia: replace linux/gpio.h inclusions

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The pcmcia drivers all use the legacy interfaces, so convert to include linux/gpio/legacy.h instead.

---
 drivers/pcmcia/bcm63xx_pcmcia.c | 2 +-
 drivers/pcmcia/db1xxx_ss.c      | 2 +-
 drivers/pcmcia/sa1100_h3600.c   | 2 +-
 drivers/pcmcia/soc_common.c     | 2 +-
 drivers/pcmcia/xxs1500_ss.c     | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
drivers/pcmcia/bcm63xx_pcmcia.c +1 -1
index 724fd6ee0fd0..1612b5d76975 100644
@@ -14,7 +14,7 @@
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/pci.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 
 #include <bcm63xx_regs.h>
 #include <bcm63xx_io.h>
drivers/pcmcia/db1xxx_ss.c +1 -1
index 7b896d7dbc9f..410d24762f13 100644
@@ -23,7 +23,7 @@
  */
 
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/interrupt.h>
 #include <linux/pm.h>
 #include <linux/module.h>
drivers/pcmcia/sa1100_h3600.c +1 -1
index 10cb99c20a7f..6c52d90795eb 100644
@@ -11,7 +11,7 @@
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
drivers/pcmcia/soc_common.c +1 -1
index 87aa3f667117..23585e3968e9 100644
@@ -32,8 +32,8 @@
 
 
 #include <linux/cpufreq.h>
-#include <linux/gpio.h>
 #include <linux/gpio/consumer.h>
+#include <linux/gpio/legacy.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
drivers/pcmcia/xxs1500_ss.c +1 -1
index 8a8aae1843b5..ba1bd0f9d9f8 100644
@@ -7,7 +7,7 @@
  */
 
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
Signature · 1 line
2.39.5
#17 lore raw

Re: [PATCH 08/13] pcmcia: replace linux/gpio.h inclusions

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Invalid resource cleanup on error path leading to potential double-free of a devres-managed GPIO descriptor. --

commit a1a20647914d78d6a15655dea889e9d53c734136
Author: Arnd Bergmann <[email protected]>

pcmcia: replace linux/gpio.h inclusions

The pcmcia drivers all use the legacy interfaces, so convert to include linux/gpio/legacy.h instead.

[ ... ]

drivers/pcmcia/sa1100_h3600.c line 14

Quoted 10 lines
drivers/pcmcia/sa1100_h3600.c +1 -1
index 10cb99c20a7f5..6c52d90795eb4 100644
@@ -11,7 +11,7 @@
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>

[Severity: High]
This isn't a bug introduced by this patch, but I noticed a pre-existing issue while reviewing the GPIO include changes.

Does the error path in h3600_pcmcia_hw_init() cause a double-free of a devres-managed GPIO descriptor?

If gpio_request(H3XXX_EGPIO_OPT_NVRAM_ON) or subsequent legacy GPIO requests fail, the code jumps to or falls through to the err01 label:

drivers/pcmcia/sa1100_h3600.c:h3600_pcmcia_hw_init() {
    ...
err06:  gpio_free(H3XXX_EGPIO_CARD_RESET);
err05:  gpio_free(H3XXX_EGPIO_OPT_RESET);
err04:  gpio_free(H3XXX_EGPIO_OPT_ON);
err03:  gpio_free(H3XXX_EGPIO_OPT_NVRAM_ON);
err01:  gpio_free(H3XXX_GPIO_PCMCIA_IRQ0);
        return err;
}

The err01 label incorrectly frees H3XXX_GPIO_PCMCIA_IRQ0. This GPIO is managed by devres and was not explicitly requested using gpio_request() in this function.

When devres cleans up the failed probe, it will attempt to free the GPIO again. This could lead to a double-free, gpiolib state corruption, kernel warnings, or accidentally freeing a GPIO acquired by a concurrent driver.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=8
#18 lore raw

Re: [PATCH 08/13] pcmcia: replace linux/gpio.h inclusions

Quoted 6 lines · On Tue, Jun 30, 2026, at 15:28, [email protected] wrote:

[Severity: High]
This isn't a bug introduced by this patch, but I noticed a pre-existing issue while reviewing the GPIO include changes.

Does the error path in h3600_pcmcia_hw_init() cause a double-free of a devres-managed GPIO descriptor?

Yes, there are many bugs in the old pcmcia drivers. I expect that we will remove these soon, as I plan to drop all the sa1100 and pxa board files early next year.

Arnd

#19 lore raw

PATCH 9/13 phy: replace linux/gpio.h inclusions

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

linux/gpio.h should no longer be used, convert these instead to either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.

---
 drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c | 2 +-
 drivers/phy/rockchip/phy-rockchip-usbdp.c | 2 +-
 drivers/phy/ti/phy-j721e-wiz.c            | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c +1 -1
index 8473fa574529..d9c06129ed23 100644
@@ -3,7 +3,7 @@
 
 #include <linux/delay.h>
 #include <linux/extcon-provider.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/gpio/consumer.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
drivers/phy/rockchip/phy-rockchip-usbdp.c +1 -1
index fba35510d88c..d0d736a30d08 100644
@@ -11,7 +11,7 @@
 #include <linux/bits.h>
 #include <linux/clk.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/mfd/syscon.h>
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
drivers/phy/ti/phy-j721e-wiz.c +1 -1
index 7531a8a04912..2233babc0078 100644
@@ -11,7 +11,7 @@
 #include <linux/slab.h>
 #include <linux/clk.h>
 #include <linux/clk-provider.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/gpio/consumer.h>
 #include <linux/io.h>
 #include <linux/module.h>
Signature · 1 line
2.39.5
#20 lore raw

Re: [PATCH 09/13] phy: replace linux/gpio.h inclusions

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Replacing `#include <linux/gpio.h>` with `#include <linux/gpio/consumer.h>` results in duplicate…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Replacing #include <linux/gpio.h> with #include <linux/gpio/consumer.h> results in duplicate include directives. --

commit 172e670e08c06c1b704f9f5d80187a66ba9bb20c
Author: Arnd Bergmann <[email protected]>

phy: replace linux/gpio.h inclusions

linux/gpio.h should no longer be used, convert these instead to either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.

drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c line 7

Quoted 11 lines
drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c +1 -1
index 8473fa5745296..d9c06129ed23e 100644
@@ -3,7 +3,7 @@
 
 #include <linux/delay.h>
 #include <linux/extcon-provider.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/gpio/consumer.h>

[Severity: Low]
This isn't a bug, but the replacement leaves us with consecutive duplicate linux/gpio/consumer.h inclusions. Could the redundant include be removed?

[ ... ]

drivers/phy/ti/phy-j721e-wiz.c line 15

Quoted 11 lines
drivers/phy/ti/phy-j721e-wiz.c +1 -1
index 7531a8a049123..2233babc00781 100644
@@ -11,7 +11,7 @@
 #include <linux/slab.h>
 #include <linux/clk.h>
 #include <linux/clk-provider.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/gpio/consumer.h>

[Severity: Low]
This isn't a bug, but similar to the broadcom phy driver, this creates duplicate linux/gpio/consumer.h inclusions here as well. Should the second one be dropped?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=9
#21 lore raw

Re: [PATCH 09/13] phy: replace linux/gpio.h inclusions

Quoted 4 lines · On Tue, Jun 30, 2026, at 15:28, [email protected] wrote:

[Severity: Low]
This isn't a bug, but the replacement leaves us with consecutive duplicate linux/gpio/consumer.h inclusions. Could the redundant include be removed?

This was already reported and fixed earlier, all of these will be addressed in v2.

Arnd

#22 lore raw

PATCH 10/13 media: replace linux/gpio.h inclusions

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

linux/gpio.h should no longer be used, convert these instead to either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.

---
 drivers/media/pci/ddbridge/ddbridge.h                 | 2 +-
 drivers/media/platform/samsung/s3c-camif/camif-core.c | 2 +-
 drivers/media/usb/em28xx/em28xx-dvb.c                 | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/media/pci/ddbridge/ddbridge.h +1 -1
index f01ecdb0b627..cf50898f9a92 100644
@@ -14,7 +14,7 @@
 #include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/dvb/ca.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/i2c.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
drivers/media/platform/samsung/s3c-camif/camif-core.c +1 -1
index 221e3c447f36..c3d059224844 100644
@@ -12,7 +12,7 @@
 #include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/errno.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/i2c.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
drivers/media/usb/em28xx/em28xx-dvb.c +1 -1
index 938f1980d448..8482fc4045ea 100644
@@ -29,7 +29,7 @@
 #include <media/dmxdev.h>
 #include <media/tuner.h>
 #include "tuner-simple.h"
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 
 #include "lgdt330x.h"
 #include "lgdt3305.h"
Signature · 1 line
2.39.5
#23 lore raw

PATCH 11/13 Input: matrix_keyboard - replace linux/gpio.h inclusion

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

linux/gpio.h is going away, so use linux/gpio/consumer.h instead.

---
 drivers/input/keyboard/matrix_keypad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/matrix_keypad.c +1 -1
index e50a6fea9a60..98d0269a978f 100644
@@ -16,7 +16,7 @@
 #include <linux/interrupt.h>
 #include <linux/jiffies.h>
 #include <linux/module.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/input/matrix_keypad.h>
 #include <linux/slab.h>
 #include <linux/of.h>
Signature · 1 line
2.39.5
#24 lore raw

Re: [PATCH 11/13] Input: matrix_keyboard - replace linux/gpio.h inclusion

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Redundant header inclusion of <linux/gpio/consumer.h> --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Redundant header inclusion of <linux/gpio/consumer.h>
--

commit b60f4c5bf1d6c83cc34b3ab6030725489bd7c3e5
Author: Arnd Bergmann <[email protected]>

Input: matrix_keyboard - replace linux/gpio.h inclusion

This commit replaces the inclusion of the deprecated linux/gpio.h header with linux/gpio/consumer.h in the matrix keypad driver. It prepares the code for the removal of linux/gpio.h.

drivers/input/keyboard/matrix_keypad.c line 19

Quoted 10 lines
drivers/input/keyboard/matrix_keypad.c +1 -1
index e50a6fea9a602..98d0269a978fe 100644
@@ -16,7 +16,7 @@
 #include <linux/interrupt.h>
 #include <linux/jiffies.h>
 #include <linux/module.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>

[Severity: Low]
Does this result in a redundant inclusion? Looking at matrix_keypad.c, <linux/gpio/consumer.h> is already included earlier in the file:

#include <linux/types.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/platform_device.h>

Could the old <linux/gpio.h> inclusion just be removed entirely instead of being replaced?

Quoted 3 lines
drivers/input/keyboard/matrix_keypad.c +0 -0
 #include <linux/input/matrix_keypad.h>
 #include <linux/slab.h>
 #include <linux/of.h>
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=11
#25 lore raw

PATCH 12/13 gpib: gpio: replace linux/gpio.h inclusion

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

linux/gpio.h is going away, so use linux/gpio/consumer.h instead.

---
 drivers/gpib/gpio/gpib_bitbang.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpib/gpio/gpib_bitbang.c +1 -1
index 0e227980b493..2e8d895db06a 100644
@@ -64,7 +64,7 @@
 #include <linux/gpio/consumer.h>
 #include <linux/gpio/driver.h>
 #include <linux/gpio/machine.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/irq.h>
 
 static int sn7516x_used = 1, sn7516x;
Signature · 1 line
2.39.5
#26 lore raw

Re: [PATCH 12/13] gpib: gpio: replace linux/gpio.h inclusion

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:

New issues:
- [Low] The patch introduces redundant duplicate #include <linux/gpio/consumer.h> statements in multiple files.

Pre-existing issues:
- [High] Missing bounds check on priv->count in bb_DAV_interrupt() can lead to a buffer overflow. --

commit 198cff3fadd8f7ab5db98a0ff2a666f4ac7f1bf0
Author: Arnd Bergmann <[email protected]>

gpib: gpio: replace linux/gpio.h inclusion

linux/gpio.h is going away, so use linux/gpio/consumer.h instead.

drivers/gpib/gpio/gpib_bitbang.c line 67

Quoted 10 lines
drivers/gpib/gpio/gpib_bitbang.c +1 -1
index 0e227980b493a..2e8d895db06a5 100644
@@ -64,7 +64,7 @@
 #include <linux/gpio/consumer.h>
 #include <linux/gpio/driver.h>
 #include <linux/gpio/machine.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>

[Severity: Low]
This isn't a bug, but does this introduce a duplicate include of linux/gpio/consumer.h? It appears to already be included a few lines above.

Similar duplicate includes might have been added to other files like drivers/input/keyboard/matrix_keypad.c and drivers/net/phy/mdio_device.c if they were also part of this series.

drivers/gpib/gpio/gpib_bitbang.c line 70

Quoted 3 lines
drivers/gpib/gpio/gpib_bitbang.c +0 -0
 #include <linux/irq.h>
 
 static int sn7516x_used = 1, sn7516x;

While reviewing this file, I noticed a separate issue in bb_DAV_interrupt().

[Severity: High]
This is a pre-existing issue, but does this lack of a bounds check on priv->count lead to a buffer overflow?

drivers/gpib/gpio/gpib_bitbang.c:bb_DAV_interrupt() {
        ...
        priv->rbuf[priv->count++] = get_data_lines();
        priv->end = !gpiod_get_value(EOI);
        ...
}

If the hardware line DAV goes low multiple times while priv->r_busy is set without waiting for the normal NRFD/NDAC handshake, could priv->count exceed the allocated buffer size and corrupt memory?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=12
#27 lore raw

PATCH 13/13 gpiolib: remove linux/gpio.h

In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>

After all other drivers have converted to linux/gpio/consumer.h or linux/gpio/legacy.h, remove the final leftover bits here.

---
 MAINTAINERS                   |  1 -
 drivers/gpio/TODO             |  4 +---
 drivers/gpio/gpiolib-cdev.c   |  2 +-
 drivers/gpio/gpiolib-legacy.c |  3 +--
 drivers/gpio/gpiolib.c        |  2 +-
 include/linux/gpio.h          | 22 ----------------------
 6 files changed, 4 insertions(+), 30 deletions(-)
 delete mode 100644 include/linux/gpio.h
MAINTAINERS +0 -1
index 15011f5752a9..7f3f386b1d8c 100644
@@ -11175,7 +11175,6 @@ F:	Documentation/devicetree/bindings/gpio/
 F:	Documentation/driver-api/gpio/
 F:	drivers/gpio/
 F:	include/dt-bindings/gpio/
-F:	include/linux/gpio.h
 F:	include/linux/gpio/
 K:	(devm_)?gpio_(request|free|direction|get|set)
 K:	GPIOD_FLAGS_BIT_NONEXCLUSIVE
drivers/gpio/TODO +1 -3
index 7ce80fde1f17..894c7e1af252 100644
@@ -52,9 +52,7 @@ Work items:
   base can be made dynamic (set to -1) if CONFIG_GPIO_SYSFS is disabled.
 
 - When this work is complete (will require some of the items in the
-  following ongoing work as well) we can delete the old global
-  numberspace accessors from <linux/gpio.h> and eventually delete
-  <linux/gpio.h> altogether.
+  following ongoing work as well) we can delete <linux/gpio/lagacy.h>.
 
 -------------------------------------------------------------------------------
 
drivers/gpio/gpiolib-cdev.c +1 -1
index 82f27db0b230..9b6a28819371 100644
@@ -11,7 +11,7 @@
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/file.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/gpio/driver.h>
 #include <linux/hte.h>
 #include <linux/interrupt.h>
drivers/gpio/gpiolib-legacy.c +1 -2
index ef3f2ef30cf2..33e5a45e720b 100644
@@ -7,8 +7,7 @@
 
 #include <linux/gpio/consumer.h>
 #include <linux/gpio/driver.h>
-
-#include <linux/gpio.h>
+#include <linux/gpio/legacy.h>
 
 #include "gpiolib.h"
 
drivers/gpio/gpiolib.c +1 -1
index e5fb60111151..1f498d6c8c68 100644
@@ -29,7 +29,7 @@
 #include <linux/string.h>
 #include <linux/string_choices.h>
 
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/gpio/driver.h>
 #include <linux/gpio/machine.h>
 
include/linux/gpio.h deleted +0 -22
deleted file mode 100644
index b0d4942a65de..000000000000
@@ -1,22 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * NOTE: This header *must not* be included.
- *
- * If you're implementing a GPIO driver, only include <linux/gpio/driver.h>
- * If you're implementing a GPIO consumer, only include <linux/gpio/consumer.h>
- * If you're using the legacy interfaces, include <linux/gpio/legacy.h>
- */
-
-#ifndef __LINUX_GPIO_H
-#define __LINUX_GPIO_H
-
-#include <linux/types.h>
-#ifdef CONFIG_GPIOLIB
-#include <linux/gpio/consumer.h>
-#endif
-
-#ifdef CONFIG_GPIOLIB_LEGACY
-#include <linux/gpio/legacy.h>
-#endif /* CONFIG_GPIOLIB_LEGACY */
-
-#endif /* __LINUX_GPIO_H */
Signature · 1 line
2.39.5
#28 lore raw

Re: [PATCH 13/13] gpiolib: remove linux/gpio.h

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Low] Removing `include/linux/gpio.h` breaks the build for multiple drivers across the kernel tree that…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Removing include/linux/gpio.h breaks the build for multiple drivers across the kernel tree that still include it and rely on it for legacy GPIO declarations.
- [Low] Typographical error in drivers/gpio/TODO where legacy.h is misspelled as lagacy.h.
--

commit eb8b9c8709d4fc96f518f3578deb6f0d05993604
Author: Arnd Bergmann <[email protected]>

gpiolib: remove linux/gpio.h

This commit removes the include/linux/gpio.h header entirely, cleaning up leftover bits under the assumption that all drivers have been converted to consumer.h or legacy.h. It also updates internal gpiolib includes and a TODO file accordingly.

drivers/gpio/TODO Work items: · line 55

Quoted 12 lines
drivers/gpio/TODO +1 -3
index 7ce80fde1f17e..894c7e1af252a 100644
@@ -52,9 +52,7 @@ Work items:
   base can be made dynamic (set to -1) if CONFIG_GPIO_SYSFS is disabled.
 
 - When this work is complete (will require some of the items in the
-  following ongoing work as well) we can delete the old global
-  numberspace accessors from <linux/gpio.h> and eventually delete
-  <linux/gpio.h> altogether.
+  following ongoing work as well) we can delete <linux/gpio/lagacy.h>.
                                                                ^^^^^^^^

[Severity: Low]
This isn't a bug, but there is a typo here (lagacy.h instead of legacy.h).

[ ... ]

Quoted 6 lines
include/linux/gpio.h deleted +0 -0
deleted file mode 100644
index b0d4942a65de2..0000000000000
@@ -1,22 +0,0 @@

[ ... ]

include/linux/gpio.h line 22

Quoted 5 lines
include/linux/gpio.h deleted +0 -5
-#ifdef CONFIG_GPIOLIB_LEGACY
-#include <linux/gpio/legacy.h>
-#endif /* CONFIG_GPIOLIB_LEGACY */
-
-#endif /* __LINUX_GPIO_H */

[Severity: Low]
Does removing this header break the build for remaining unconverted legacy GPIO consumers?

For example, drivers/input/keyboard/gpio_keys.c:gpio_keys_setup_key() still appears to rely on this header for devm_gpio_request_one():

    error = devm_gpio_request_one(dev, button->gpio, GPIOF_IN, desc);

Similarly, drivers/leds/leds-gpio.c:gpio_led_get_gpiod() also relies on it:

    ret = devm_gpio_request_one(dev, template->gpio, GPIOF_OUT_INIT_LOW,
                                template->name);

And arch/x86/platform/olpc/olpc-xo1-sci.c:setup_ec_sci() still uses gpio_request():

    r = gpio_request(OLPC_GPIO_ECSCI, "OLPC-ECSCI");

Will these drivers fail to compile since functions like devm_gpio_request_one() and gpio_request() will now be missing or implicitly declared?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=13
#29 lore raw

Re: [PATCH 13/13] gpiolib: remove linux/gpio.h

Quoted 8 lines · On Tue, Jun 30, 2026, at 15:28, [email protected] wrote:

drivers/gpio/TODO Work items: · line 55

Quoted 5 lines

- When this work is complete (will require some of the items in the

drivers/gpio/TODO +1 -3
-  following ongoing work as well) we can delete the old global
-  numberspace accessors from <linux/gpio.h> and eventually delete
-  <linux/gpio.h> altogether.
+  following ongoing work as well) we can delete <linux/gpio/lagacy.h>.
                                                                ^^^^^^^^

[Severity: Low]
This isn't a bug, but there is a typo here (lagacy.h instead of legacy.h).

Fixed now for v2.

Quoted 9 lines

include/linux/gpio.h line 22

Quoted 5 lines
include/linux/gpio.h deleted +0 -5
-#ifdef CONFIG_GPIOLIB_LEGACY
-#include <linux/gpio/legacy.h>
-#endif /* CONFIG_GPIOLIB_LEGACY */
-
-#endif /* __LINUX_GPIO_H */

[Severity: Low]
Does removing this header break the build for remaining unconverted legacy GPIO consumers?

There are a few more patches in flight that all have to be applied before this one.

Arnd

Reviewed-by on v1 13/13
#30 lore raw

Re: [PATCH 13/13] gpiolib: remove linux/gpio.h

In reply to Arnd Bergmann
Quoted 14 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

After all other drivers have converted to linux/gpio/consumer.h or linux/gpio/legacy.h, remove the final leftover bits here.

---
  MAINTAINERS                   |  1 -
  drivers/gpio/TODO             |  4 +---
  drivers/gpio/gpiolib-cdev.c   |  2 +-
  drivers/gpio/gpiolib-legacy.c |  3 +--
  drivers/gpio/gpiolib.c        |  2 +-
  include/linux/gpio.h          | 22 ----------------------
  6 files changed, 4 insertions(+), 30 deletions(-)
Quoted 1 line

delete mode 100644 include/linux/gpio.h

#31 lore raw
In reply to Arnd Bergmann
Quoted 8 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The linux/gpio.h header used to be the global definition for the gpio interfaces, with 1100 users back in linux-3.17. In linux-7.2, only about 130 of those remain, so this series cleans out the rest.

In each subsystem, we can replace the header either with linux/gpio/consumer.h for users of the modern gpio descriptor interface,

A few of them already used <linux/gpio/consumer.h>, and is duplicated now.

Signature · 8 lines
Andreas Schwab, [email protected]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
#32 lore raw
Quoted 8 lines · Andreas Schwab
Quoted 6 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The linux/gpio.h header used to be the global definition for the gpio interfaces, with 1100 users back in linux-3.17. In linux-7.2, only about 130 of those remain, so this series cleans out the rest.

Quoted 5 lines
Quoted 2 lines

In each subsystem, we can replace the header either with linux/gpio/consumer.h for users of the modern gpio descriptor interface,

A few of them already used <linux/gpio/consumer.h>, and is duplicated now.

Indeed, I have removed the extra ones now and folded those into the patches.

Arnd

drivers/gpib/gpio/gpib_bitbang.c +0 -1
index 2e8d895db06a..34d14b94a0b8 100644
@@ -64,7 +64,6 @@
 #include <linux/gpio/consumer.h>
 #include <linux/gpio/driver.h>
 #include <linux/gpio/machine.h>
-#include <linux/gpio/consumer.h>
 #include <linux/irq.h>
 
 static int sn7516x_used = 1, sn7516x;
drivers/input/keyboard/matrix_keypad.c +0 -1
index 98d0269a978f..8863b741d1a3 100644
@@ -16,7 +16,6 @@
 #include <linux/interrupt.h>
 #include <linux/jiffies.h>
 #include <linux/module.h>
-#include <linux/gpio/consumer.h>
 #include <linux/input/matrix_keypad.h>
 #include <linux/slab.h>
 #include <linux/of.h>
drivers/input/misc/soc_button_array.c +0 -1
index eb11bf2e9436..a6c984205123 100644
@@ -15,7 +15,6 @@
 #include <linux/dmi.h>
 #include <linux/gpio/consumer.h>
 #include <linux/gpio_keys.h>
-#include <linux/gpio/consumer.h>
 #include <linux/platform_device.h>
 
 static bool use_low_level_irq;
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +0 -1
index 88c5c52e0e38..5f5adc9c9e83 100644
@@ -16,7 +16,6 @@
 #include <linux/net_tstamp.h>
 #include <linux/ptp_classify.h>
 #include <linux/ptp_pch.h>
-#include <linux/gpio/consumer.h>
 
 #define PCH_GBE_MAR_ENTRIES		16
 #define PCH_GBE_SHORT_PKT		64
drivers/net/phy/mdio_device.c +0 -1
index a18263d5bb02..06151f207134 100644
@@ -9,7 +9,6 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/gpio/consumer.h>
-#include <linux/gpio/consumer.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c +0 -1
index d9c06129ed23..171bf097a8b8 100644
@@ -4,7 +4,6 @@
 #include <linux/delay.h>
 #include <linux/extcon-provider.h>
 #include <linux/gpio/consumer.h>
-#include <linux/gpio/consumer.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
drivers/phy/ti/phy-j721e-wiz.c +0 -1
index 2233babc0078..1f5dba49ace4 100644
@@ -12,7 +12,6 @@
 #include <linux/clk.h>
 #include <linux/clk-provider.h>
 #include <linux/gpio/consumer.h>
-#include <linux/gpio/consumer.h>
 #include <linux/io.h>
 #include <linux/module.h>
 #include <linux/mfd/syscon.h>
include/linux/mfd/ti-lmu.h +0 -1
index 5040c7d1e1b9..2089ec5124e8 100644
@@ -10,7 +10,6 @@
 #ifndef __MFD_TI_LMU_H__
 #define __MFD_TI_LMU_H__
 
-#include <linux/gpio/consumer.h>
 #include <linux/notifier.h>
 #include <linux/regmap.h>
 #include <linux/gpio/consumer.h>
sound/soc/codecs/cs42l84.c +0 -1
index 36c3abc21fed..f2448b4c11fc 100644
@@ -16,7 +16,6 @@
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/i2c.h>
-#include <linux/gpio/consumer.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
 #include <linux/acpi.h>
sound/soc/codecs/dmic.c +0 -1
index 8b05d6f9b429..cbed11136935 100644
@@ -7,7 +7,6 @@
 
 #include <linux/delay.h>
 #include <linux/gpio/consumer.h>
-#include <linux/gpio/consumer.h>
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
 #include <linux/slab.h>
maintainer Acked-by on the v1 series
#33 lore raw
In reply to Arnd Bergmann
Quoted 11 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The linux/gpio.h header used to be the global definition for the gpio interfaces, with 1100 users back in linux-3.17. In linux-7.2, only about 130 of those remain, so this series cleans out the rest.

In each subsystem, we can replace the header either with linux/gpio/consumer.h for users of the modern gpio descriptor interface, or linux/gpio/legacy.h for the few remaining users of the old number based interface.

Quoted 8 lines

All patches in this series can get applied independently, so my preference would be for each subsystem maintainer to apply these directly, with the rest going into the gpio tree at some point.

The final patch here obviously needs to wait for all the others to get merged first.

Arnd

Thanks for doing this Arnd!

For the series:

maintainer Reviewed-by on the v1 series
#34 lore raw
In reply to Arnd Bergmann
Quoted 11 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The linux/gpio.h header used to be the global definition for the gpio interfaces, with 1100 users back in linux-3.17. In linux-7.2, only about 130 of those remain, so this series cleans out the rest.

In each subsystem, we can replace the header either with linux/gpio/consumer.h for users of the modern gpio descriptor interface, or linux/gpio/legacy.h for the few remaining users of the old number based interface.

Quoted 6 lines

All patches in this series can get applied independently, so my preference would be for each subsystem maintainer to apply these directly, with the rest going into the gpio tree at some point.

The final patch here obviously needs to wait for all the others to get merged first.

This is helpful.
The series:

Yours,
Linus Walleij

#35 lore raw
In reply to Arnd Bergmann
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 6 lines · On Mon, 29 Jun 2026 15:26:20 +0200 you wrote:

From: Arnd Bergmann <[email protected]>

The linux/gpio.h header used to be the global definition for the gpio interfaces, with 1100 users back in linux-3.17. In linux-7.2, only about 130 of those remain, so this series cleans out the rest.

Quoted 6 lines

In each subsystem, we can replace the header either with linux/gpio/consumer.h for users of the modern gpio descriptor interface, or linux/gpio/legacy.h for the few remaining users of the old number based interface.

[...]

Here is the summary with links:
- [01/13] ARM: replace linux/gpio.h inclusions (no matching commit)
- [02/13] m68k/coldfire: replace linux/gpio.h inclusions (no matching commit)
- [03/13] mips: replace linux/gpio.h inclusions (no matching commit)
- [04/13] sh: replace linux/gpio.h inclusions (no matching commit)
- [05/13] mfd: replace linux/gpio.h inclusions (no matching commit)
- [06/13,net-next] net: replace linux/gpio.h inclusions

    https://git.kernel.org/netdev/net-next/c/a53d1872f2be

- [07/13] ASoC: replace linux/gpio.h inclusions
(no matching commit)
- [08/13] pcmcia: replace linux/gpio.h inclusions
(no matching commit)
- [09/13] phy: replace linux/gpio.h inclusions
(no matching commit)
- [10/13] media: replace linux/gpio.h inclusions
(no matching commit)
- [11/13] Input: matrix_keyboard - replace linux/gpio.h inclusion (no matching commit)
- [12/13] gpib: gpio: replace linux/gpio.h inclusion (no matching commit)
- [13/13] gpiolib: remove linux/gpio.h
(no matching commit)

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html