[PATCH] pinctrl: tegra: Enable easier compile testing
From: Krzysztof Kozlowski
Date: Fri Apr 10 2026 - 06:30:38 EST
Currently NVIDIA Tegra pin controller drivers cannot be compile tested,
unless ARCH_TEGRA is selected. That partially defeats the purpose of
compile testing, since ARCH_TEGRA is pulled when building platform
kernels. Solve it and allow compile testing independently of ARCH_TEGRA
choice which requires few less usual changes:
1. Descent in Makefile in to drivers/pinctrl/tegra/ unconditionally,
because there is no menu option.
2. Depend on COMMON_CLK for PINCTRL_TEGRA20, because it uses
clk_register_mux().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>
---
Not extensively compile tested yet. Pushing so LKP will pick it up. My
build tests are still in progress.
---
drivers/pinctrl/Makefile | 2 +-
drivers/pinctrl/tegra/Kconfig | 22 ++++++++++++----------
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
index f7d5d5f76d0c..9d33fa28a096 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
@@ -93,7 +93,7 @@ obj-y += starfive/
obj-$(CONFIG_PINCTRL_STM32) += stm32/
obj-y += sunplus/
obj-$(CONFIG_PINCTRL_SUNXI) += sunxi/
-obj-$(CONFIG_ARCH_TEGRA) += tegra/
+obj-y += tegra/
obj-y += ti/
obj-$(CONFIG_PINCTRL_UNIPHIER) += uniphier/
obj-$(CONFIG_PINCTRL_VISCONTI) += visconti/
diff --git a/drivers/pinctrl/tegra/Kconfig b/drivers/pinctrl/tegra/Kconfig
index 660d101ea367..3e8789871f0f 100644
--- a/drivers/pinctrl/tegra/Kconfig
+++ b/drivers/pinctrl/tegra/Kconfig
@@ -1,43 +1,45 @@
# SPDX-License-Identifier: GPL-2.0-only
config PINCTRL_TEGRA
- bool
+ bool "NVIDIA Tegra pin controllers common" if COMPILE_TEST && !ARCH_TEGRA
select PINMUX
select PINCONF
config PINCTRL_TEGRA20
- bool
+ bool "NVIDIA Tegra20 pin controller" if COMPILE_TEST && !ARCH_TEGRA
select PINCTRL_TEGRA
+ depends on COMMON_CLK
config PINCTRL_TEGRA30
- bool
+ bool "NVIDIA Tegra30 pin controller" if COMPILE_TEST && !ARCH_TEGRA
select PINCTRL_TEGRA
config PINCTRL_TEGRA114
- bool
+ bool "NVIDIA Tegra114 pin controller" if COMPILE_TEST && !ARCH_TEGRA
select PINCTRL_TEGRA
config PINCTRL_TEGRA124
- bool
+ bool "NVIDIA Tegra124 pin controller" if COMPILE_TEST && !ARCH_TEGRA
select PINCTRL_TEGRA
config PINCTRL_TEGRA210
- bool
+ bool "NVIDIA Tegra210 pin controller" if COMPILE_TEST && !ARCH_TEGRA
select PINCTRL_TEGRA
config PINCTRL_TEGRA186
- bool
+ bool "NVIDIA Tegra186 pin controller" if COMPILE_TEST && !ARCH_TEGRA
select PINCTRL_TEGRA
config PINCTRL_TEGRA194
- bool
+ bool "NVIDIA Tegra194 pin controller" if COMPILE_TEST && !ARCH_TEGRA
select PINCTRL_TEGRA
config PINCTRL_TEGRA234
- bool
+ bool "NVIDIA Tegra234 pin controller" if COMPILE_TEST && !ARCH_TEGRA
select PINCTRL_TEGRA
config PINCTRL_TEGRA_XUSB
- def_bool y if ARCH_TEGRA
+ bool "NVIDIA Tegra XUSB pin controller" if COMPILE_TEST && !ARCH_TEGRA
+ default y if ARCH_TEGRA
select GENERIC_PHY
select PINCONF
select PINMUX
--
2.51.0