Skip to contentSkip to conversation

pinctrl: adjust dependencies closer to arch/SoC

PATCH In review Peter Robinson 3 participants 7 messages Dec 27, 2015 – Jan 5, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

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
index 4d2efad..68fa13a 100644
@@ -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
maintainer
#2 lore raw

Re: [PATCH 1/2] pinctrl: intel: on enable on x86 arches and COMPILE_TEST

Quoted 14 lines · Peter Robinson

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 +0 -0
index 4d2efad..68fa13a 100644

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.
+
+endif
Signature · 1 line
2.5.0
#3 lore raw

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_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 +0 -0
index 4d2efad..68fa13a 100644
@@ -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 && 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.

ACPI is available on arm64 and there's patches around for ARM, none of which would support the intel hardware, hence the patch.

Peter

maintainer
#4 lore raw

Re: [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_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 +0 -0
index 4d2efad..68fa13a 100644
@@ -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 && 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 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).

#5 lore raw

PATCH 2/2 pinctrl: AMD: depend on Seattle or x86

In reply to 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.

---
 drivers/pinctrl/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/Kconfig +1 -1
index 312c78b..e02d1d4 100644
@@ -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
#6 lore raw

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.

(...)

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