Skip to contentSkip to conversation

pinctrl: intel: wrap Intel pin control drivers in an architecture check

PATCH In review Peter Robinson 5 participants 8 messages Jul 4, 2017 – Aug 29, 2017

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

PATCH 1/1 pinctrl: intel: wrap Intel pin control drivers in an architecture check

The Intel pin control drivers are architecture specific so add an if arch to check for X86 or compile test to ensure continued test coverage.

Cc Mika Westerberg <[email protected]>
Cc Heikki Krogerus <[email protected]>
---
 drivers/pinctrl/intel/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
drivers/pinctrl/intel/Kconfig +3 -0
index 396830a41127..0c7edc321415 100644
@@ -1,6 +1,7 @@
 #
 # Intel pin control drivers
 #
+if (X86 || COMPILE_TEST)
 
 config PINCTRL_BAYTRAIL
 	bool "Intel Baytrail GPIO pin control"
@@ -72,3 +73,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.13.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 23 lines · Peter Robinson

The Intel pin control drivers are architecture specific so add an if arch to check for X86 or compile test to ensure continued test coverage.

Cc Mika Westerberg <[email protected]>
Cc Heikki Krogerus <[email protected]>
---
 drivers/pinctrl/intel/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
drivers/pinctrl/intel/Kconfig +1 -0
index 396830a41127..0c7edc321415 100644
@@ -1,6 +1,7 @@
 #
 # Intel pin control drivers
 #
+if (X86 || COMPILE_TEST)
 
 config PINCTRL_BAYTRAIL
 	bool "Intel Baytrail GPIO pin control"

drivers/pinctrl/intel/Kconfig config PINCTRL_SUNRISEPOINT · line 77

Quoted 5 lines
drivers/pinctrl/intel/Kconfig +2 -0
@@ -72,3 +73,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

OK by me:

Thanks,

Signature · 1 line
heikki
#2 lore raw
Quoted 5 lines · Heikki Krogerus
Quoted 4 lines · Peter Robinson

The Intel pin control drivers are architecture specific so add an if arch
to check for X86 or compile test to ensure continued test coverage.

Sorry, have not seen the original mail.

Quoted 7 lines
Quoted 7 lines
Cc Mika Westerberg <[email protected]>
Cc Heikki Krogerus <[email protected]>

---
 drivers/pinctrl/intel/Kconfig | 3 +++

 1 file changed, 3 insertions(+)
Quoted 10 lines

drivers/pinctrl/intel/Kconfig line 4

Quoted 10 lines
drivers/pinctrl/intel/Kconfig +1 -0
index 396830a41127..0c7edc321415 100644
@@ -1,6 +1,7 @@
  #
  # Intel pin control drivers
  #
+if (X86 || COMPILE_TEST)

And what about ARM et al. architectures?

Instead I would propose to reorganize parent Kconfig to have something like

if (ARM || COMPILE_TEST)
...ARM stuff...
endif

if (X86 || COMPILE_TEST)
...X86 stuff...
endif

But personally I don't like any of the above. So, what's the issue this patch is targeting against?

Quoted 19 lines

drivers/pinctrl/intel/Kconfig config PINCTRL_SUNRISEPOINT · line 77

Quoted 11 lines


 config PINCTRL_BAYTRAIL
  bool "Intel Baytrail GPIO pin control"

drivers/pinctrl/intel/Kconfig +0 -0
@@ -72,3 +73,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.

drivers/pinctrl/intel/Kconfig +2 -0
+
+endif

OK by me:

Thanks,

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#3 lore raw
Quoted 8 lines · Andy Shevchenko
Quoted 5 lines · Heikki Krogerus
Quoted 4 lines · Peter Robinson

The Intel pin control drivers are architecture specific so add an if arch
to check for X86 or compile test to ensure continued test coverage.

Sorry, have not seen the original mail.

https://marc.info/?l=linux-gpio&m=149915099506284&w=3

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Cc Mika Westerberg <[email protected]>
Cc Heikki Krogerus <[email protected]>
---
 drivers/pinctrl/intel/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
Quoted 12 lines
Quoted 10 lines

drivers/pinctrl/intel/Kconfig line 4

Quoted 10 lines
drivers/pinctrl/intel/Kconfig +1 -0
index 396830a41127..0c7edc321415 100644
@@ -1,6 +1,7 @@
 #
 # Intel pin control drivers
 #
+if (X86 || COMPILE_TEST)

And what about ARM et al. architectures?

If you look in the various sub directories you'll see that the various arch sub directories have similar for their SoC eg ARCH_SUNXI or explicit depends on the SoC achieving the same outcome.

Quoted 2 lines

Instead I would propose to reorganize parent Kconfig to have something like

Well they're done in alphabetical and there's appropriate depends ARCH_ or SOC_ etc so that those architectures don't randomly pop up in configs for other unrelated things, the intel/ one is one of the only ones that doesn't do this (hence this patch)

Quoted 10 lines

if (ARM || COMPILE_TEST)
...ARM stuff...
endif

if (X86 || COMPILE_TEST)
...X86 stuff...
endif

But personally I don't like any of the above. So, what's the issue this patch is targeting against?

So that every time (in my case a distro) they don't have to explicitly have unrelated "# CONFIG_PINCTRL_CHERRYVIEW is not set" style bits through all their configs because it's completely unrelated to the platform.

Quoted 23 lines
Quoted 14 lines

drivers/pinctrl/intel/Kconfig config PINCTRL_SUNRISEPOINT · line 77

Quoted 11 lines
drivers/pinctrl/intel/Kconfig +0 -0
 config PINCTRL_BAYTRAIL
    bool "Intel Baytrail GPIO pin control"
@@ -72,3 +73,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.

drivers/pinctrl/intel/Kconfig +2 -0
+
+endif

OK by me:

Quoted 5 lines

Thanks,

--
Andy Shevchenko <[email protected]> Intel Finland Oy

maintainer Acked-by
#6 lore raw
Quoted 11 lines · Linus Walleij
Quoted 6 lines · Peter Robinson

The Intel pin control drivers are architecture specific so add an if arch to check for X86 or compile test to ensure continued test coverage.

Cc Mika Westerberg <[email protected]>
Cc Heikki Krogerus <[email protected]>

I'm waiting for Mika to say what he thinks about this. He's the overall Intel pin control maintainer.

Looks fine to me,

#4 lore raw
In reply to Peter Robinson
Quoted 15 lines · Peter Robinson
Quoted 12 lines · Andy Shevchenko
Quoted 9 lines · Heikki Krogerus

drivers/pinctrl/intel/Kconfig line 4

Quoted 7 lines · Peter Robinson
drivers/pinctrl/intel/Kconfig +1 -0
@@ -1,6 +1,7 @@
  #
  # Intel pin control drivers
  #
+if (X86 || COMPILE_TEST)

And what about ARM et al. architectures?

Quoted 3 lines

If you look in the various sub directories you'll see that the various arch sub directories have similar for their SoC eg ARCH_SUNXI or explicit depends on the SoC achieving the same outcome.

ARM world is too fragmented. I can't take it as a good example. Most of distros would like to maintain less kernels (ideally one per architecture). In the above example it's a sub-arch.

Yes, I know that x86 has 3 let's say "sub-arches" which require different settings to kernel. (None of them makes difference to pin control case though)

Quoted 17 lines
Quoted 3 lines

Instead I would propose to reorganize parent Kconfig to have something
like

Well they're done in alphabetical and there's appropriate depends ARCH_ or SOC_ etc so that those architectures don't randomly pop up in configs for other unrelated things, the intel/ one is one of the only ones that doesn't do this (hence this patch)

Quoted 8 lines

if (ARM || COMPILE_TEST)
...ARM stuff...
endif

if (X86 || COMPILE_TEST)
...X86 stuff...
endif

Quoted 8 lines
Quoted 3 lines

But personally I don't like any of the above. So, what's the issue this
patch is targeting against?

So that every time (in my case a distro) they don't have to explicitly have unrelated "# CONFIG_PINCTRL_CHERRYVIEW is not set" style bits through all their configs because it's completely unrelated to the platform.

Okay, so, what's wrong with defining big blocks on per ARCH basis as I pointed above?

ARM, ARM64, X86, etc.

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy