Skip to content

Commit af475c1

Browse files
arndbBartosz Golaszewski
authored andcommitted
gpio: fix up CONFIG_OF dependencies
A number of GPIO drivers that used to have a CONFIG_OF_GPIO dependency now fail to build on targets without CONFIG_OF: WARNING: unmet direct dependencies detected for GPIO_SYSCON Depends on [n]: GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON [=y] && OF [=n] Selected by [y]: - GPIO_SAMA5D2_PIOBU [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON [=y] && (ARCH_AT91 || COMPILE_TEST [=y]) drivers/gpio/gpio-mt7621.c: In function 'mediatek_gpio_bank_probe': drivers/gpio/gpio-mt7621.c:254:20: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells' 254 | rg->chip.gc.of_gpio_n_cells = 2; | ^ drivers/gpio/gpio-tegra186.c: In function 'tegra186_gpio_of_xlate': drivers/gpio/gpio-tegra186.c:502:25: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells' 502 | if (WARN_ON(chip->of_gpio_n_cells < 2)) | ^~ drivers/gpio/gpio-lpc32xx.c: In function 'lpc32xx_gpio_probe': drivers/gpio/gpio-lpc32xx.c:523:49: error: 'struct gpio_chip' has no member named 'of_xlate' 523 | lpc32xx_gpiochip[i].chip.of_xlate = lpc32xx_of_xlate; | ^ drivers/gpio/gpio-spacemit-k1.c: In function 'spacemit_gpio_add_bank': drivers/gpio/gpio-spacemit-k1.c:234:11: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells' 234 | gc->of_gpio_n_cells = 3; | ^~ Bring that back as a dependency. Fixes: 7803501 ("gpio: drop unneeded Kconfig dependencies on OF_GPIO") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20260325100144.1696731-1-arnd@kernel.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
1 parent 541c5b0 commit af475c1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/gpio/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ config GPIO_BRCMSTB
236236
tristate "BRCMSTB GPIO support"
237237
default y if (ARCH_BRCMSTB || BMIPS_GENERIC)
238238
depends on ARCH_BRCMSTB || ARCH_BCM2835 || BMIPS_GENERIC || COMPILE_TEST
239+
depends on OF
239240
select GPIO_GENERIC
240241
select IRQ_DOMAIN
241242
help
@@ -463,6 +464,7 @@ config GPIO_LPC18XX
463464
config GPIO_LPC32XX
464465
tristate "NXP LPC32XX GPIO support"
465466
depends on ARCH_LPC32XX || COMPILE_TEST
467+
depends on OF
466468
help
467469
Select this option to enable GPIO driver for
468470
NXP LPC32XX devices.
@@ -505,6 +507,7 @@ config GPIO_MPC8XXX
505507
config GPIO_MT7621
506508
bool "Mediatek MT7621 GPIO Support"
507509
depends on SOC_MT7620 || SOC_MT7621 || COMPILE_TEST
510+
depends on OF
508511
select GPIO_GENERIC
509512
select GPIOLIB_IRQCHIP
510513
help
@@ -645,6 +648,7 @@ config GPIO_RTD
645648

646649
config GPIO_SAMA5D2_PIOBU
647650
tristate "SAMA5D2 PIOBU GPIO support"
651+
depends on OF
648652
depends on MFD_SYSCON
649653
depends on ARCH_AT91 || COMPILE_TEST
650654
select GPIO_SYSCON
@@ -685,6 +689,7 @@ config GPIO_SNPS_CREG
685689
config GPIO_SPACEMIT_K1
686690
tristate "SPACEMIT K1 GPIO support"
687691
depends on ARCH_SPACEMIT || COMPILE_TEST
692+
depends on OF
688693
select GPIO_GENERIC
689694
select GPIOLIB_IRQCHIP
690695
help
@@ -750,6 +755,7 @@ config GPIO_TEGRA186
750755
tristate "NVIDIA Tegra186 GPIO support"
751756
default ARCH_TEGRA_186_SOC || ARCH_TEGRA_194_SOC || ARCH_TEGRA_234_SOC
752757
depends on ARCH_TEGRA_186_SOC || ARCH_TEGRA_194_SOC || ARCH_TEGRA_234_SOC || COMPILE_TEST
758+
depends on OF
753759
select GPIOLIB_IRQCHIP
754760
select IRQ_DOMAIN_HIERARCHY
755761
help

0 commit comments

Comments
 (0)