[PATCH 05/12] gpio: allow building port-mapped GPIO drivers with COMPILE_TEST=y

Bartosz Golaszewski posted 12 patches 8 months, 1 week ago
[PATCH 05/12] gpio: allow building port-mapped GPIO drivers with COMPILE_TEST=y
Posted by Bartosz Golaszewski 8 months, 1 week ago
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Extend the build coverage by allowing the port-mapped drivers to be
build with COMPILE_TEST enabled.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 drivers/gpio/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index f2c39bbff83a..5bbc7f724a09 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -889,7 +889,7 @@ config GPIO_IDT3243X
 endmenu
 
 menu "Port-mapped I/O GPIO drivers"
-	depends on X86 && HAS_IOPORT # I/O space access
+	depends on (X86 && HAS_IOPORT) || COMPILE_TEST # I/O space access
 
 config GPIO_VX855
 	tristate "VIA VX855/VX875 GPIO"

-- 
2.45.2
Re: [PATCH 05/12] gpio: allow building port-mapped GPIO drivers with COMPILE_TEST=y
Posted by Bartosz Golaszewski 8 months ago
On Mon, Apr 7, 2025 at 9:13 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Extend the build coverage by allowing the port-mapped drivers to be
> build with COMPILE_TEST enabled.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---

This caused numerous problems in next so I'm dropping it.

Bartosz
Re: [PATCH 05/12] gpio: allow building port-mapped GPIO drivers with COMPILE_TEST=y
Posted by Linus Walleij 8 months ago
On Mon, Apr 7, 2025 at 9:13 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:

> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Extend the build coverage by allowing the port-mapped drivers to be
> build with COMPILE_TEST enabled.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

That's really helpful!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Re: [PATCH 05/12] gpio: allow building port-mapped GPIO drivers with COMPILE_TEST=y
Posted by Andy Shevchenko 8 months, 1 week ago
On Mon, Apr 07, 2025 at 09:13:14AM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> Extend the build coverage by allowing the port-mapped drivers to be
> build with COMPILE_TEST enabled.

...

>  menu "Port-mapped I/O GPIO drivers"
> -	depends on X86 && HAS_IOPORT # I/O space access
> +	depends on (X86 && HAS_IOPORT) || COMPILE_TEST # I/O space access

Are you sure about this? Do we have IO accessor stubs? I don't remember that.

What about

	depends on HAS_IOPORT # I/O space access
	depends on X86 || COMPILE_TEST

instead?

-- 
With Best Regards,
Andy Shevchenko