[PATCH] gpio: pc104: Add COMPILE_TEST coverage

Rosen Penev posted 1 patch 6 days, 6 hours ago
drivers/gpio/Kconfig | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
[PATCH] gpio: pc104: Add COMPILE_TEST coverage
Posted by Rosen Penev 6 days, 6 hours ago
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
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/gpio/Kconfig | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 25a6d7af3f5c..c33a10a31861 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -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
Re: [PATCH] gpio: pc104: Add COMPILE_TEST coverage
Posted by Bartosz Golaszewski 4 days, 14 hours ago
On Mon, 18 May 2026 23:49:51 +0200, Rosen Penev <rosenp@gmail.com> said:
> 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

> Assisted-by: Codex:GPT-5.5
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  drivers/gpio/Kconfig | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index 25a6d7af3f5c..c33a10a31861 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -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
>
>