]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gpio: drop unneeded Kconfig dependencies on OF_GPIO
authorBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Mon, 16 Mar 2026 09:45:23 +0000 (10:45 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Tue, 24 Mar 2026 09:04:04 +0000 (10:04 +0100)
OF_GPIO is selected automatically on all OF systems. Any symbols it
controls also provide stubs so there's really no reason to select it
explicitly. Remove all Kconfig dependencies/selects for GPIO drivers.
For those that have no other dependencies: convert it to requiring
CONFIG_OF instead to avoid new symbols popping up in make config.

Link: https://patch.msgid.link/20260316-gpio-of-kconfig-v2-3-de2f4b00a0e4@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/Kconfig

index 6d39c871251376d217b48d5c854e0a5182ab1ab0..4294d6cbccf45cde9478ba36bbaf04be81bcd645 100644 (file)
@@ -142,7 +142,7 @@ menu "Memory mapped GPIO drivers"
 
 config GPIO_74XX_MMIO
        tristate "GPIO driver for 74xx-ICs with MMIO access"
-       depends on OF_GPIO
+       depends on OF
        select GPIO_GENERIC
        help
          Say yes here to support GPIO functionality for 74xx-compatible ICs
@@ -172,14 +172,14 @@ config GPIO_AMDPT
 
 config GPIO_ASPEED
        tristate "Aspeed GPIO support"
-       depends on (ARCH_ASPEED || COMPILE_TEST) && OF_GPIO
+       depends on ARCH_ASPEED || COMPILE_TEST
        select GPIOLIB_IRQCHIP
        help
          Say Y here to support Aspeed AST2400 and AST2500 GPIO controllers.
 
 config GPIO_ASPEED_SGPIO
        bool "Aspeed SGPIO support"
-       depends on (ARCH_ASPEED || COMPILE_TEST) && OF_GPIO
+       depends on ARCH_ASPEED || COMPILE_TEST
        select GPIO_GENERIC
        select GPIOLIB_IRQCHIP
        help
@@ -198,7 +198,6 @@ config GPIO_ATH79
 config GPIO_RASPBERRYPI_EXP
        tristate "Raspberry Pi 3 GPIO Expander"
        default RASPBERRYPI_FIRMWARE
-       depends on OF_GPIO
        # Make sure not 'y' when RASPBERRYPI_FIRMWARE is 'm'. This can only
        # happen when COMPILE_TEST=y, hence the added !RASPBERRYPI_FIRMWARE.
        depends on (ARCH_BCM2835 && RASPBERRYPI_FIRMWARE) || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE)
@@ -215,7 +214,7 @@ config GPIO_BCM_KONA
 
 config GPIO_BCM_XGS_IPROC
        tristate "BRCM XGS iProc GPIO support"
-       depends on OF_GPIO && (ARCH_BCM_IPROC || COMPILE_TEST)
+       depends on ARCH_BCM_IPROC || COMPILE_TEST
        select GPIO_GENERIC
        select GPIOLIB_IRQCHIP
        default ARCH_BCM_IPROC
@@ -226,7 +225,6 @@ config GPIO_BLZP1600
        tristate "Blaize BLZP1600 GPIO support"
        default y if ARCH_BLAIZE
        depends on ARCH_BLAIZE || COMPILE_TEST
-       depends on OF_GPIO
        select GPIO_GENERIC
        select GPIOLIB_IRQCHIP
        help
@@ -237,7 +235,7 @@ config GPIO_BLZP1600
 config GPIO_BRCMSTB
        tristate "BRCMSTB GPIO support"
        default y if (ARCH_BRCMSTB || BMIPS_GENERIC)
-       depends on OF_GPIO && (ARCH_BRCMSTB || ARCH_BCM2835 || BMIPS_GENERIC || COMPILE_TEST)
+       depends on ARCH_BRCMSTB || ARCH_BCM2835 || BMIPS_GENERIC || COMPILE_TEST
        select GPIO_GENERIC
        select IRQ_DOMAIN
        help
@@ -245,7 +243,7 @@ config GPIO_BRCMSTB
 
 config GPIO_CADENCE
        tristate "Cadence GPIO support"
-       depends on OF_GPIO
+       depends on OF
        select GPIO_GENERIC
        select GPIOLIB_IRQCHIP
        help
@@ -277,14 +275,13 @@ config GPIO_DWAPB
 config GPIO_EIC_SPRD
        tristate "Spreadtrum EIC support"
        depends on ARCH_SPRD || COMPILE_TEST
-       depends on OF_GPIO
        select GPIOLIB_IRQCHIP
        help
          Say yes here to support Spreadtrum EIC device.
 
 config GPIO_EM
        tristate "Emma Mobile GPIO"
-       depends on (ARCH_EMEV2 || COMPILE_TEST) && OF_GPIO
+       depends on ARCH_EMEV2 || COMPILE_TEST
        help
          Say yes here to support GPIO on Renesas Emma Mobile SoCs.
 
@@ -326,7 +323,7 @@ config GPIO_GE_FPGA
 
 config GPIO_FTGPIO010
        bool "Faraday FTGPIO010 GPIO"
-       depends on OF_GPIO
+       depends on OF
        select GPIO_GENERIC
        select GPIOLIB_IRQCHIP
        default (ARCH_GEMINI || ARCH_MOXART)
@@ -380,7 +377,7 @@ config GPIO_HISI
 
 config GPIO_HLWD
        tristate "Nintendo Wii (Hollywood) GPIO"
-       depends on OF_GPIO
+       depends on OF
        select GPIO_GENERIC
        select GPIOLIB_IRQCHIP
        help
@@ -431,7 +428,6 @@ config GPIO_LOONGSON
 config GPIO_LOONGSON_64BIT
        tristate "Loongson 64 bit GPIO support"
        depends on LOONGARCH || COMPILE_TEST
-       depends on OF_GPIO
        select GPIO_GENERIC
        select GPIOLIB_IRQCHIP
        help
@@ -444,7 +440,7 @@ config GPIO_LOONGSON_64BIT
 config GPIO_LPC18XX
        tristate "NXP LPC18XX/43XX GPIO support"
        default y if ARCH_LPC18XX
-       depends on OF_GPIO && (ARCH_LPC18XX || COMPILE_TEST)
+       depends on ARCH_LPC18XX || COMPILE_TEST
        select IRQ_DOMAIN_HIERARCHY
        select GPIOLIB_IRQCHIP
        help
@@ -453,7 +449,7 @@ config GPIO_LPC18XX
 
 config GPIO_LPC32XX
        tristate "NXP LPC32XX GPIO support"
-       depends on OF_GPIO && (ARCH_LPC32XX || COMPILE_TEST)
+       depends on ARCH_LPC32XX || COMPILE_TEST
        help
          Select this option to enable GPIO driver for
          NXP LPC32XX devices.
@@ -496,7 +492,6 @@ config GPIO_MPC8XXX
 config GPIO_MT7621
        bool "Mediatek MT7621 GPIO Support"
        depends on SOC_MT7620 || SOC_MT7621 || COMPILE_TEST
-       depends on OF_GPIO
        select GPIO_GENERIC
        select GPIOLIB_IRQCHIP
        help
@@ -589,7 +584,6 @@ config GPIO_RCAR
 config GPIO_RDA
        bool "RDA Micro GPIO controller support"
        depends on ARCH_RDA || COMPILE_TEST
-       depends on OF_GPIO
        select GPIO_GENERIC
        select GPIOLIB_IRQCHIP
        help
@@ -639,7 +633,6 @@ config GPIO_RTD
 config GPIO_SAMA5D2_PIOBU
        tristate "SAMA5D2 PIOBU GPIO support"
        depends on MFD_SYSCON
-       depends on OF_GPIO
        depends on ARCH_AT91 || COMPILE_TEST
        select GPIO_SYSCON
        help
@@ -651,7 +644,7 @@ config GPIO_SAMA5D2_PIOBU
 
 config GPIO_SIFIVE
        tristate "SiFive GPIO support"
-       depends on OF_GPIO
+       depends on OF
        select IRQ_DOMAIN_HIERARCHY
        select GPIO_GENERIC
        select GPIOLIB_IRQCHIP
@@ -670,7 +663,6 @@ config GPIO_SIOX
 config GPIO_SNPS_CREG
        bool "Synopsys GPIO via CREG (Control REGisters) driver"
        depends on ARC || COMPILE_TEST
-       depends on OF_GPIO
        help
          This driver supports GPIOs via CREG on various Synopsys SoCs.
          This is a single-register MMIO GPIO driver for complex cases
@@ -680,7 +672,6 @@ config GPIO_SNPS_CREG
 config GPIO_SPACEMIT_K1
        tristate "SPACEMIT K1 GPIO support"
        depends on ARCH_SPACEMIT || COMPILE_TEST
-       depends on OF_GPIO
        select GPIO_GENERIC
        select GPIOLIB_IRQCHIP
        help
@@ -696,7 +687,6 @@ config GPIO_SPEAR_SPICS
 config GPIO_SPRD
        tristate "Spreadtrum GPIO support"
        depends on ARCH_SPRD || COMPILE_TEST
-       depends on OF_GPIO
        select GPIOLIB_IRQCHIP
        help
          Say yes here to support Spreadtrum GPIO device.
@@ -704,7 +694,6 @@ config GPIO_SPRD
 config GPIO_STP_XWAY
        bool "XWAY STP GPIOs"
        depends on SOC_XWAY || COMPILE_TEST
-       depends on OF_GPIO
        help
          This enables support for the Serial To Parallel (STP) unit found on
          XWAY SoC. The STP allows the SoC to drive a shift registers cascade,
@@ -739,7 +728,6 @@ config GPIO_TEGRA
        tristate "NVIDIA Tegra GPIO support"
        default ARCH_TEGRA
        depends on ARCH_TEGRA || COMPILE_TEST
-       depends on OF_GPIO
        select GPIOLIB_IRQCHIP
        select IRQ_DOMAIN_HIERARCHY
        help
@@ -749,7 +737,6 @@ config GPIO_TEGRA186
        tristate "NVIDIA Tegra186 GPIO support"
        default ARCH_TEGRA_186_SOC || ARCH_TEGRA_194_SOC || ARCH_TEGRA_234_SOC
        depends on ARCH_TEGRA_186_SOC || ARCH_TEGRA_194_SOC || ARCH_TEGRA_234_SOC || COMPILE_TEST
-       depends on OF_GPIO
        select GPIOLIB_IRQCHIP
        select IRQ_DOMAIN_HIERARCHY
        help
@@ -757,7 +744,6 @@ config GPIO_TEGRA186
 
 config GPIO_TS4800
        tristate "TS-4800 DIO blocks and compatibles"
-       depends on OF_GPIO
        depends on SOC_IMX51 || COMPILE_TEST
        select GPIO_GENERIC
        help
@@ -777,7 +763,6 @@ config GPIO_THUNDERX
 config GPIO_UNIPHIER
        tristate "UniPhier GPIO support"
        depends on ARCH_UNIPHIER || COMPILE_TEST
-       depends on OF_GPIO
        select IRQ_DOMAIN_HIERARCHY
        help
          Say yes here to support UniPhier GPIOs.
@@ -794,7 +779,6 @@ config GPIO_VF610
 config GPIO_VISCONTI
        tristate "Toshiba Visconti GPIO support"
        depends on ARCH_VISCONTI || COMPILE_TEST
-       depends on OF_GPIO
        select GPIOLIB_IRQCHIP
        select GPIO_GENERIC
        select IRQ_DOMAIN_HIERARCHY
@@ -803,14 +787,14 @@ config GPIO_VISCONTI
 
 config GPIO_WCD934X
        tristate "Qualcomm Technologies Inc WCD9340/WCD9341 GPIO controller driver"
-       depends on MFD_WCD934X && OF_GPIO
+       depends on MFD_WCD934X
        help
          This driver is to support GPIO block found on the Qualcomm Technologies
         Inc WCD9340/WCD9341 Audio Codec.
 
 config GPIO_XGENE
        bool "APM X-Gene GPIO controller support"
-       depends on ARM64 && OF_GPIO
+       depends on ARM64
        help
          This driver is to support the GPIO block within the APM X-Gene SoC
          platform's generic flash controller. The GPIO pins are muxed with
@@ -1108,7 +1092,7 @@ menu "I2C GPIO expanders"
 
 config GPIO_ADNP
        tristate "Avionic Design N-bit GPIO expander"
-       depends on OF_GPIO
+       depends on OF
        select GPIOLIB_IRQCHIP
        help
          This option enables support for N GPIOs found on Avionic Design
@@ -1141,7 +1125,7 @@ config GPIO_DS4520
 
 config GPIO_GW_PLD
        tristate "Gateworks PLD GPIO Expander"
-       depends on OF_GPIO
+       depends on OF
        help
          Say yes here to provide access to the Gateworks I2C PLD GPIO
          Expander. This is used at least on the Cambria GW2358-4.
@@ -1565,7 +1549,6 @@ config GPIO_PALMAS
 config GPIO_PMIC_EIC_SPRD
        tristate "Spreadtrum PMIC EIC support"
        depends on MFD_SC27XX_PMIC || COMPILE_TEST
-       depends on OF_GPIO
        select GPIOLIB_IRQCHIP
        help
          Say yes here to support Spreadtrum PMIC EIC device.
@@ -1604,7 +1587,6 @@ config GPIO_SL28CPLD
 config GPIO_STMPE
        tristate "STMPE GPIOs"
        depends on MFD_STMPE
-       depends on OF_GPIO
        select GPIOLIB_IRQCHIP
        help
          This enables support for the GPIOs found on the STMPE I/O
@@ -1613,7 +1595,6 @@ config GPIO_STMPE
 config GPIO_TC3589X
        bool "TC3589X GPIOs"
        depends on MFD_TC3589X
-       depends on OF_GPIO
        select GPIOLIB_IRQCHIP
        help
          This enables support for the GPIOs found on the TC3589X
@@ -2003,7 +1984,7 @@ config GPIO_LATCH
 
 config GPIO_LINE_MUX
        tristate "GPIO line mux driver"
-       depends on OF_GPIO
+       depends on OF
        select MULTIPLEXER
        help
          Say Y here to support the GPIO line mux, which can provide virtual