Skip to contentSkip to conversation

gpio: pc104: Add COMPILE_TEST coverage

PATCH Superseded Rosen Penev 2 participants 2 messages May 18 – May 20 GPIO

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: pc104: Add COMPILE_TEST coverage

The port-mapped GPIO drivers are hidden on non-x86 builds even when the architecture provides I/O port access. Several PC/104 GPIO drivers only depend on generic ISA, regmap, and gpiolib infrastructure, so they can be built for compile-test coverage.

Allow the port-mapped GPIO menu and the PC/104 GPIO drivers to be selected under COMPILE_TEST while retaining the existing HAS_IOPORT guard.

Assisted-by Codex:GPT-5.5
---
 drivers/gpio/Kconfig | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/gpio/Kconfig +6 -5
index 25a6d7af3f5c..c33a10a31861 100644
@@ -934,7 +934,8 @@ config GPIO_IDT3243X
 endmenu
 
 menu "Port-mapped I/O GPIO drivers"
-	depends on X86 && HAS_IOPORT # I/O space access
+	depends on X86 || COMPILE_TEST
+	depends on HAS_IOPORT # I/O space access
 
 config GPIO_VX855
 	tristate "VIA VX855/VX875 GPIO"
@@ -963,7 +964,7 @@ config GPIO_I8255
 
 config GPIO_104_DIO_48E
 	tristate "ACCES 104-DIO-48E GPIO support"
-	depends on PC104
+	depends on PC104 || COMPILE_TEST
 	select ISA_BUS_API
 	select REGMAP_MMIO
 	select REGMAP_IRQ
@@ -978,7 +979,7 @@ config GPIO_104_DIO_48E
 
 config GPIO_104_IDIO_16
 	tristate "ACCES 104-IDIO-16 GPIO support"
-	depends on PC104
+	depends on PC104 || COMPILE_TEST
 	select ISA_BUS_API
 	select REGMAP_MMIO
 	select GPIO_IDIO_16
@@ -991,7 +992,7 @@ config GPIO_104_IDIO_16
 
 config GPIO_104_IDI_48
 	tristate "ACCES 104-IDI-48 GPIO support"
-	depends on PC104
+	depends on PC104 || COMPILE_TEST
 	select ISA_BUS_API
 	select REGMAP_MMIO
 	select REGMAP_IRQ
@@ -1016,7 +1017,7 @@ config GPIO_F7188X
 
 config GPIO_GPIO_MM
 	tristate "Diamond Systems GPIO-MM GPIO support"
-	depends on PC104
+	depends on PC104 || COMPILE_TEST
 	select ISA_BUS_API
 	select REGMAP_MMIO
 	select GPIO_I8255
Signature · 1 line
2.54.0
#1 lore raw
Quoted 8 lines · Rosen Penev

The port-mapped GPIO drivers are hidden on non-x86 builds even when the architecture provides I/O port access. Several PC/104 GPIO drivers only depend on generic ISA, regmap, and gpiolib infrastructure, so they can be built for compile-test coverage.

Allow the port-mapped GPIO menu and the PC/104 GPIO drivers to be selected under COMPILE_TEST while retaining the existing HAS_IOPORT guard.

This to me should be split into two commits: one adding the menu and one extending the coverage.

Bart

Quoted 60 lines
Assisted-by Codex:GPT-5.5
---
 drivers/gpio/Kconfig | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/gpio/Kconfig +6 -6
index 25a6d7af3f5c..c33a10a31861 100644
@@ -934,7 +934,8 @@ config GPIO_IDT3243X
 endmenu
 
 menu "Port-mapped I/O GPIO drivers"
-	depends on X86 && HAS_IOPORT # I/O space access
+	depends on X86 || COMPILE_TEST
+	depends on HAS_IOPORT # I/O space access
 
 config GPIO_VX855
 	tristate "VIA VX855/VX875 GPIO"
@@ -963,7 +964,7 @@ config GPIO_I8255
 
 config GPIO_104_DIO_48E
 	tristate "ACCES 104-DIO-48E GPIO support"
-	depends on PC104
+	depends on PC104 || COMPILE_TEST
 	select ISA_BUS_API
 	select REGMAP_MMIO
 	select REGMAP_IRQ
@@ -978,7 +979,7 @@ config GPIO_104_DIO_48E
 
 config GPIO_104_IDIO_16
 	tristate "ACCES 104-IDIO-16 GPIO support"
-	depends on PC104
+	depends on PC104 || COMPILE_TEST
 	select ISA_BUS_API
 	select REGMAP_MMIO
 	select GPIO_IDIO_16
@@ -991,7 +992,7 @@ config GPIO_104_IDIO_16
 
 config GPIO_104_IDI_48
 	tristate "ACCES 104-IDI-48 GPIO support"
-	depends on PC104
+	depends on PC104 || COMPILE_TEST
 	select ISA_BUS_API
 	select REGMAP_MMIO
 	select REGMAP_IRQ
@@ -1016,7 +1017,7 @@ config GPIO_F7188X
 
 config GPIO_GPIO_MM
 	tristate "Diamond Systems GPIO-MM GPIO support"
-	depends on PC104
+	depends on PC104 || COMPILE_TEST
 	select ISA_BUS_API
 	select REGMAP_MMIO
 	select GPIO_I8255
--

2.54.0