pinctrl: adjust dependencies closer to arch/SoC
Subsystems (3)
Hi All,
In enabling just ARCH_ROCKCHIP, or a number of other combos, you get numerous other non related pinctrl options that appear just by selecting PINCTRL. These two patches add appropriate dependencies and COMPILE_TEST to allow finer grained control.
Peter
PATCH 1/2 pinctrl: intel: on enable on x86 arches and COMPILE_TEST
If you select CONFIG_PINCTR for another unrelated architecture you need to set all the Intel pinctrl options even though they're not required. Mask them if not required.
--- drivers/pinctrl/intel/Kconfig | 4 ++++ 1 file changed, 4 insertions(+)
drivers/pinctrl/intel/Kconfig +4 -0
@@ -2,6 +2,8 @@ # Intel pin control drivers # +if X86_GENERIC || COMPILE_TEST + config PINCTRL_BAYTRAIL bool "Intel Baytrail GPIO pin control" depends on GPIOLIB && ACPI
@@ -50,3 +52,5 @@ config PINCTRL_SUNRISEPOINT Sunrisepoint is the PCH of Intel Skylake. This pinctrl driver provides an interface that allows configuring of PCH pins and using them as GPIOs. + +endif
Signature · 1 line
2.5.0
Mika Westerberg
maintainerRe: [PATCH 1/2] pinctrl: intel: on enable on x86 arches and COMPILE_TEST
Quoted 14 lines · Peter Robinson
If you select
CONFIG_PINCTRfor another unrelated architecture you need to set all the Intel pinctrl options even though they're not required. Mask them if not required.Signed-off-by Peter Robinson <[email protected]>--- drivers/pinctrl/intel/Kconfig | 4 ++++ 1 file changed, 4 insertions(+)drivers/pinctrl/intel/Kconfig +0
-0
drivers/pinctrl/intel/Kconfig line 9
Quoted 8 lines
drivers/pinctrl/intel/Kconfig +2
-0@@ -2,6 +2,8 @@ # Intel pin control drivers # +if X86_GENERIC || COMPILE_TEST + config PINCTRL_BAYTRAIL bool "Intel Baytrail GPIO pin control" depends on GPIOLIB && ACPI
All of them already depend on CONFIG_ACPI so if your unrelated architecture does not provide that then you should not see any of these.
Quoted 8 lines
drivers/pinctrl/intel/Kconfig +2
-0@@ -50,3 +52,5 @@ config PINCTRL_SUNRISEPOINT Sunrisepoint is the PCH of Intel Skylake. This pinctrl driver provides an interface that allows configuring of PCH pins and using them as GPIOs. + +endifSignature · 1 line
2.5.0
Re: [PATCH 1/2] pinctrl: intel: on enable on x86 arches and COMPILE_TEST
Quoted 18 lines · Mika Westerberg
Quoted 17 lines · Peter Robinson
If you select
CONFIG_PINCTRfor another unrelated architecture you need to set all the Intel pinctrl options even though they're not required. Mask them if not required.Signed-off-by Peter Robinson <[email protected]>--- drivers/pinctrl/intel/Kconfig | 4 ++++ 1 file changed, 4 insertions(+)drivers/pinctrl/intel/Kconfig +0
-0@@ -2,6 +2,8 @@ # Intel pin control drivers #
Quoted 8 lines
drivers/pinctrl/intel/Kconfig line 9
Quoted 5 lines
drivers/pinctrl/intel/Kconfig +2
-0+if X86_GENERIC || COMPILE_TEST + config PINCTRL_BAYTRAIL bool "Intel Baytrail GPIO pin control" depends on GPIOLIB && ACPIAll of them already depend on
CONFIG_ACPIso if your unrelated architecture does not provide that then you should not see any of these.
ACPI is available on arm64 and there's patches around for ARM, none of which would support the intel hardware, hence the patch.
Peter
Mika Westerberg
maintainerRe: [PATCH 1/2] pinctrl: intel: on enable on x86 arches and COMPILE_TEST
Quoted 29 lines · Peter Robinson
Quoted 18 lines · Mika Westerberg
Quoted 17 lines · Peter Robinson
If you select
CONFIG_PINCTRfor another unrelated architecture you need to set all the Intel pinctrl options even though they're not required. Mask them if not required.Signed-off-by Peter Robinson <[email protected]>--- drivers/pinctrl/intel/Kconfig | 4 ++++ 1 file changed, 4 insertions(+)drivers/pinctrl/intel/Kconfig +0
-0@@ -2,6 +2,8 @@ # Intel pin control drivers #Quoted 8 lines
drivers/pinctrl/intel/Kconfig line 9
Quoted 5 lines
drivers/pinctrl/intel/Kconfig +2
-0+if X86_GENERIC || COMPILE_TEST + config PINCTRL_BAYTRAIL bool "Intel Baytrail GPIO pin control" depends on GPIOLIB && ACPIAll of them already depend on
CONFIG_ACPIso if your unrelated architecture does not provide that then you should not see any of these.
Quoted 2 lines
ACPI is available on arm64 and there's patches around for ARM, none of which would support the intel hardware, hence the patch.
I see.
Then I suggest you use "if X86 || COMPILE_TEST" instead of X86_GENERIC because the latter does not even cover 64-bit CPUs (and is more about optimizing for generic 32-bit CPUs than selecting proper CPU architecture).
PATCH 2/2 pinctrl: AMD: depend on Seattle or x86
In reply to Peter RobinsonAdd a dependency on the ARM64 Seatle SoC or generic x86 so we're not prompted if we enable pinctrl for another platform.
--- drivers/pinctrl/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/Kconfig +1 -1
@@ -80,7 +80,7 @@ config PINCTRL_AT91PIO4 config PINCTRL_AMD bool "AMD GPIO pin control" - depends on GPIOLIB + depends on GPIOLIB && (ARCH_SEATTLE || X86_GENERIC || COMPILE_TEST) select GPIOLIB_IRQCHIP select PINCONF select GENERIC_PINCONF
Signature · 1 line
2.5.0
Re: [PATCH 2/2] pinctrl: AMD: depend on Seattle or x86
Quoted 4 lines · Peter Robinson
Add a dependency on the ARM64 Seatle SoC or generic x86 so we're not prompted if we enable pinctrl for another platform.
Signed-off-by Peter Robinson <[email protected]>
(...)
drivers/pinctrl/Kconfig config PINCTRL_AT91PIO4 · line 83
Quoted 2 lines
drivers/pinctrl/Kconfig +1
-1- depends on GPIOLIB + depends on GPIOLIB && (ARCH_SEATTLE || X86_GENERIC || COMPILE_TEST)
I suspect this should depend on X86 rather than X86_GENERIC as Mika pointed out for patch #1 so waiting for a new version of both patches.
Yours,
Linus Walleij