diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 8ef2179fb9991b78eac8c394e0f798300df5b76f..beccdc1d0467667bc50ea3b24357821e84b427c4 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -439,7 +439,7 @@ config GPIO_PMIC_EIC_SPRD
 
 config GPIO_PXA
 	bool "PXA GPIO support"
-	depends on ARCH_PXA || ARCH_MMP
+	depends on ARCH_PXA || ARCH_MMP || COMPILE_TEST
 	help
 	  Say yes here to support the PXA GPIO device