]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
pinctrl: tegra: Enable easier compile testing
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Fri, 10 Apr 2026 10:30:06 +0000 (12:30 +0200)
committerLinus Walleij <linusw@kernel.org>
Tue, 28 Apr 2026 09:08:48 +0000 (11:08 +0200)
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@oss.qualcomm.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
drivers/pinctrl/Makefile
drivers/pinctrl/tegra/Kconfig

index f7d5d5f76d0c8becc0aa1d77c68b6ced924ea264..9d33fa28a0968ace380d41fcda3c8f309d2579b4 100644 (file)
@@ -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/
index 660d101ea3679aac3370000e138c25a741252032..3e8789871f0fbd1b12722ca44434bebb1f43f636 100644 (file)
@@ -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