Skip to content

Commit 7803501

Browse files
author
Bartosz Golaszewski
committed
gpio: drop unneeded Kconfig dependencies on OF_GPIO
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>
1 parent ececb46 commit 7803501

1 file changed

Lines changed: 17 additions & 36 deletions

File tree

drivers/gpio/Kconfig

Lines changed: 17 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ menu "Memory mapped GPIO drivers"
142142

143143
config GPIO_74XX_MMIO
144144
tristate "GPIO driver for 74xx-ICs with MMIO access"
145-
depends on OF_GPIO
145+
depends on OF
146146
select GPIO_GENERIC
147147
help
148148
Say yes here to support GPIO functionality for 74xx-compatible ICs
@@ -172,14 +172,14 @@ config GPIO_AMDPT
172172

173173
config GPIO_ASPEED
174174
tristate "Aspeed GPIO support"
175-
depends on (ARCH_ASPEED || COMPILE_TEST) && OF_GPIO
175+
depends on ARCH_ASPEED || COMPILE_TEST
176176
select GPIOLIB_IRQCHIP
177177
help
178178
Say Y here to support Aspeed AST2400 and AST2500 GPIO controllers.
179179

180180
config GPIO_ASPEED_SGPIO
181181
bool "Aspeed SGPIO support"
182-
depends on (ARCH_ASPEED || COMPILE_TEST) && OF_GPIO
182+
depends on ARCH_ASPEED || COMPILE_TEST
183183
select GPIO_GENERIC
184184
select GPIOLIB_IRQCHIP
185185
help
@@ -198,7 +198,6 @@ config GPIO_ATH79
198198
config GPIO_RASPBERRYPI_EXP
199199
tristate "Raspberry Pi 3 GPIO Expander"
200200
default RASPBERRYPI_FIRMWARE
201-
depends on OF_GPIO
202201
# Make sure not 'y' when RASPBERRYPI_FIRMWARE is 'm'. This can only
203202
# happen when COMPILE_TEST=y, hence the added !RASPBERRYPI_FIRMWARE.
204203
depends on (ARCH_BCM2835 && RASPBERRYPI_FIRMWARE) || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE)
@@ -215,7 +214,7 @@ config GPIO_BCM_KONA
215214

216215
config GPIO_BCM_XGS_IPROC
217216
tristate "BRCM XGS iProc GPIO support"
218-
depends on OF_GPIO && (ARCH_BCM_IPROC || COMPILE_TEST)
217+
depends on ARCH_BCM_IPROC || COMPILE_TEST
219218
select GPIO_GENERIC
220219
select GPIOLIB_IRQCHIP
221220
default ARCH_BCM_IPROC
@@ -226,7 +225,6 @@ config GPIO_BLZP1600
226225
tristate "Blaize BLZP1600 GPIO support"
227226
default y if ARCH_BLAIZE
228227
depends on ARCH_BLAIZE || COMPILE_TEST
229-
depends on OF_GPIO
230228
select GPIO_GENERIC
231229
select GPIOLIB_IRQCHIP
232230
help
@@ -237,15 +235,15 @@ config GPIO_BLZP1600
237235
config GPIO_BRCMSTB
238236
tristate "BRCMSTB GPIO support"
239237
default y if (ARCH_BRCMSTB || BMIPS_GENERIC)
240-
depends on OF_GPIO && (ARCH_BRCMSTB || ARCH_BCM2835 || BMIPS_GENERIC || COMPILE_TEST)
238+
depends on ARCH_BRCMSTB || ARCH_BCM2835 || BMIPS_GENERIC || COMPILE_TEST
241239
select GPIO_GENERIC
242240
select IRQ_DOMAIN
243241
help
244242
Say yes here to enable GPIO support for Broadcom STB (BCM7XXX) SoCs.
245243

246244
config GPIO_CADENCE
247245
tristate "Cadence GPIO support"
248-
depends on OF_GPIO
246+
depends on OF
249247
select GPIO_GENERIC
250248
select GPIOLIB_IRQCHIP
251249
help
@@ -277,14 +275,13 @@ config GPIO_DWAPB
277275
config GPIO_EIC_SPRD
278276
tristate "Spreadtrum EIC support"
279277
depends on ARCH_SPRD || COMPILE_TEST
280-
depends on OF_GPIO
281278
select GPIOLIB_IRQCHIP
282279
help
283280
Say yes here to support Spreadtrum EIC device.
284281

285282
config GPIO_EM
286283
tristate "Emma Mobile GPIO"
287-
depends on (ARCH_EMEV2 || COMPILE_TEST) && OF_GPIO
284+
depends on ARCH_EMEV2 || COMPILE_TEST
288285
help
289286
Say yes here to support GPIO on Renesas Emma Mobile SoCs.
290287

@@ -326,7 +323,7 @@ config GPIO_GE_FPGA
326323

327324
config GPIO_FTGPIO010
328325
bool "Faraday FTGPIO010 GPIO"
329-
depends on OF_GPIO
326+
depends on OF
330327
select GPIO_GENERIC
331328
select GPIOLIB_IRQCHIP
332329
default (ARCH_GEMINI || ARCH_MOXART)
@@ -380,7 +377,7 @@ config GPIO_HISI
380377

381378
config GPIO_HLWD
382379
tristate "Nintendo Wii (Hollywood) GPIO"
383-
depends on OF_GPIO
380+
depends on OF
384381
select GPIO_GENERIC
385382
select GPIOLIB_IRQCHIP
386383
help
@@ -431,7 +428,6 @@ config GPIO_LOONGSON
431428
config GPIO_LOONGSON_64BIT
432429
tristate "Loongson 64 bit GPIO support"
433430
depends on LOONGARCH || COMPILE_TEST
434-
depends on OF_GPIO
435431
select GPIO_GENERIC
436432
select GPIOLIB_IRQCHIP
437433
help
@@ -444,7 +440,7 @@ config GPIO_LOONGSON_64BIT
444440
config GPIO_LPC18XX
445441
tristate "NXP LPC18XX/43XX GPIO support"
446442
default y if ARCH_LPC18XX
447-
depends on OF_GPIO && (ARCH_LPC18XX || COMPILE_TEST)
443+
depends on ARCH_LPC18XX || COMPILE_TEST
448444
select IRQ_DOMAIN_HIERARCHY
449445
select GPIOLIB_IRQCHIP
450446
help
@@ -453,7 +449,7 @@ config GPIO_LPC18XX
453449

454450
config GPIO_LPC32XX
455451
tristate "NXP LPC32XX GPIO support"
456-
depends on OF_GPIO && (ARCH_LPC32XX || COMPILE_TEST)
452+
depends on ARCH_LPC32XX || COMPILE_TEST
457453
help
458454
Select this option to enable GPIO driver for
459455
NXP LPC32XX devices.
@@ -496,7 +492,6 @@ config GPIO_MPC8XXX
496492
config GPIO_MT7621
497493
bool "Mediatek MT7621 GPIO Support"
498494
depends on SOC_MT7620 || SOC_MT7621 || COMPILE_TEST
499-
depends on OF_GPIO
500495
select GPIO_GENERIC
501496
select GPIOLIB_IRQCHIP
502497
help
@@ -589,7 +584,6 @@ config GPIO_RCAR
589584
config GPIO_RDA
590585
bool "RDA Micro GPIO controller support"
591586
depends on ARCH_RDA || COMPILE_TEST
592-
depends on OF_GPIO
593587
select GPIO_GENERIC
594588
select GPIOLIB_IRQCHIP
595589
help
@@ -639,7 +633,6 @@ config GPIO_RTD
639633
config GPIO_SAMA5D2_PIOBU
640634
tristate "SAMA5D2 PIOBU GPIO support"
641635
depends on MFD_SYSCON
642-
depends on OF_GPIO
643636
depends on ARCH_AT91 || COMPILE_TEST
644637
select GPIO_SYSCON
645638
help
@@ -651,7 +644,7 @@ config GPIO_SAMA5D2_PIOBU
651644

652645
config GPIO_SIFIVE
653646
tristate "SiFive GPIO support"
654-
depends on OF_GPIO
647+
depends on OF
655648
select IRQ_DOMAIN_HIERARCHY
656649
select GPIO_GENERIC
657650
select GPIOLIB_IRQCHIP
@@ -670,7 +663,6 @@ config GPIO_SIOX
670663
config GPIO_SNPS_CREG
671664
bool "Synopsys GPIO via CREG (Control REGisters) driver"
672665
depends on ARC || COMPILE_TEST
673-
depends on OF_GPIO
674666
help
675667
This driver supports GPIOs via CREG on various Synopsys SoCs.
676668
This is a single-register MMIO GPIO driver for complex cases
@@ -680,7 +672,6 @@ config GPIO_SNPS_CREG
680672
config GPIO_SPACEMIT_K1
681673
tristate "SPACEMIT K1 GPIO support"
682674
depends on ARCH_SPACEMIT || COMPILE_TEST
683-
depends on OF_GPIO
684675
select GPIO_GENERIC
685676
select GPIOLIB_IRQCHIP
686677
help
@@ -696,15 +687,13 @@ config GPIO_SPEAR_SPICS
696687
config GPIO_SPRD
697688
tristate "Spreadtrum GPIO support"
698689
depends on ARCH_SPRD || COMPILE_TEST
699-
depends on OF_GPIO
700690
select GPIOLIB_IRQCHIP
701691
help
702692
Say yes here to support Spreadtrum GPIO device.
703693

704694
config GPIO_STP_XWAY
705695
bool "XWAY STP GPIOs"
706696
depends on SOC_XWAY || COMPILE_TEST
707-
depends on OF_GPIO
708697
help
709698
This enables support for the Serial To Parallel (STP) unit found on
710699
XWAY SoC. The STP allows the SoC to drive a shift registers cascade,
@@ -739,7 +728,6 @@ config GPIO_TEGRA
739728
tristate "NVIDIA Tegra GPIO support"
740729
default ARCH_TEGRA
741730
depends on ARCH_TEGRA || COMPILE_TEST
742-
depends on OF_GPIO
743731
select GPIOLIB_IRQCHIP
744732
select IRQ_DOMAIN_HIERARCHY
745733
help
@@ -749,15 +737,13 @@ config GPIO_TEGRA186
749737
tristate "NVIDIA Tegra186 GPIO support"
750738
default ARCH_TEGRA_186_SOC || ARCH_TEGRA_194_SOC || ARCH_TEGRA_234_SOC
751739
depends on ARCH_TEGRA_186_SOC || ARCH_TEGRA_194_SOC || ARCH_TEGRA_234_SOC || COMPILE_TEST
752-
depends on OF_GPIO
753740
select GPIOLIB_IRQCHIP
754741
select IRQ_DOMAIN_HIERARCHY
755742
help
756743
Say yes here to support GPIO pins on NVIDIA Tegra186, 194 and 234 SoCs.
757744

758745
config GPIO_TS4800
759746
tristate "TS-4800 DIO blocks and compatibles"
760-
depends on OF_GPIO
761747
depends on SOC_IMX51 || COMPILE_TEST
762748
select GPIO_GENERIC
763749
help
@@ -777,7 +763,6 @@ config GPIO_THUNDERX
777763
config GPIO_UNIPHIER
778764
tristate "UniPhier GPIO support"
779765
depends on ARCH_UNIPHIER || COMPILE_TEST
780-
depends on OF_GPIO
781766
select IRQ_DOMAIN_HIERARCHY
782767
help
783768
Say yes here to support UniPhier GPIOs.
@@ -794,7 +779,6 @@ config GPIO_VF610
794779
config GPIO_VISCONTI
795780
tristate "Toshiba Visconti GPIO support"
796781
depends on ARCH_VISCONTI || COMPILE_TEST
797-
depends on OF_GPIO
798782
select GPIOLIB_IRQCHIP
799783
select GPIO_GENERIC
800784
select IRQ_DOMAIN_HIERARCHY
@@ -803,14 +787,14 @@ config GPIO_VISCONTI
803787

804788
config GPIO_WCD934X
805789
tristate "Qualcomm Technologies Inc WCD9340/WCD9341 GPIO controller driver"
806-
depends on MFD_WCD934X && OF_GPIO
790+
depends on MFD_WCD934X
807791
help
808792
This driver is to support GPIO block found on the Qualcomm Technologies
809793
Inc WCD9340/WCD9341 Audio Codec.
810794

811795
config GPIO_XGENE
812796
bool "APM X-Gene GPIO controller support"
813-
depends on ARM64 && OF_GPIO
797+
depends on ARM64
814798
help
815799
This driver is to support the GPIO block within the APM X-Gene SoC
816800
platform's generic flash controller. The GPIO pins are muxed with
@@ -1108,7 +1092,7 @@ menu "I2C GPIO expanders"
11081092

11091093
config GPIO_ADNP
11101094
tristate "Avionic Design N-bit GPIO expander"
1111-
depends on OF_GPIO
1095+
depends on OF
11121096
select GPIOLIB_IRQCHIP
11131097
help
11141098
This option enables support for N GPIOs found on Avionic Design
@@ -1141,7 +1125,7 @@ config GPIO_DS4520
11411125

11421126
config GPIO_GW_PLD
11431127
tristate "Gateworks PLD GPIO Expander"
1144-
depends on OF_GPIO
1128+
depends on OF
11451129
help
11461130
Say yes here to provide access to the Gateworks I2C PLD GPIO
11471131
Expander. This is used at least on the Cambria GW2358-4.
@@ -1565,7 +1549,6 @@ config GPIO_PALMAS
15651549
config GPIO_PMIC_EIC_SPRD
15661550
tristate "Spreadtrum PMIC EIC support"
15671551
depends on MFD_SC27XX_PMIC || COMPILE_TEST
1568-
depends on OF_GPIO
15691552
select GPIOLIB_IRQCHIP
15701553
help
15711554
Say yes here to support Spreadtrum PMIC EIC device.
@@ -1604,7 +1587,6 @@ config GPIO_SL28CPLD
16041587
config GPIO_STMPE
16051588
tristate "STMPE GPIOs"
16061589
depends on MFD_STMPE
1607-
depends on OF_GPIO
16081590
select GPIOLIB_IRQCHIP
16091591
help
16101592
This enables support for the GPIOs found on the STMPE I/O
@@ -1613,7 +1595,6 @@ config GPIO_STMPE
16131595
config GPIO_TC3589X
16141596
bool "TC3589X GPIOs"
16151597
depends on MFD_TC3589X
1616-
depends on OF_GPIO
16171598
select GPIOLIB_IRQCHIP
16181599
help
16191600
This enables support for the GPIOs found on the TC3589X
@@ -2003,7 +1984,7 @@ config GPIO_LATCH
20031984

20041985
config GPIO_LINE_MUX
20051986
tristate "GPIO line mux driver"
2006-
depends on OF_GPIO
1987+
depends on OF
20071988
select MULTIPLEXER
20081989
help
20091990
Say Y here to support the GPIO line mux, which can provide virtual

0 commit comments

Comments
 (0)