mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] gpio: pc104: Add COMPILE_TEST coverage
@ 2026-05-18 21:49 Rosen Penev
  2026-05-20 13:20 ` Bartosz Golaszewski
  0 siblings, 1 reply; 2+ messages in thread
From: Rosen Penev @ 2026-05-18 21:49 UTC (permalink / raw)
  To: linux-gpio; +Cc: Linus Walleij, Bartosz Golaszewski, open list

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpio: pc104: Add COMPILE_TEST coverage
  2026-05-18 21:49 [PATCH] gpio: pc104: Add COMPILE_TEST coverage Rosen Penev
@ 2026-05-20 13:20 ` Bartosz Golaszewski
  0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2026-05-20 13:20 UTC (permalink / raw)
  To: Rosen Penev; +Cc: Linus Walleij, Bartosz Golaszewski, open list, linux-gpio

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
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-20 13:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-18 21:49 [PATCH] gpio: pc104: Add COMPILE_TEST coverage Rosen Penev
2026-05-20 13:20 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®