linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pinctrl: adjust dependencies closer to arch/SoC
@ 2015-12-27 12:22 Peter Robinson
  2015-12-27 12:22 ` [PATCH 1/2] pinctrl: intel: on enable on x86 arches and COMPILE_TEST Peter Robinson
  2015-12-27 12:22 ` [PATCH 2/2] pinctrl: AMD: depend on Seattle or x86 Peter Robinson
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Robinson @ 2015-12-27 12:22 UTC (permalink / raw)
  To: Linus Walleij, linux-gpio, Mika Westerberg, Heikki Krogerus

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] pinctrl: intel: on enable on x86 arches and COMPILE_TEST
  2015-12-27 12:22 pinctrl: adjust dependencies closer to arch/SoC Peter Robinson
@ 2015-12-27 12:22 ` Peter Robinson
  2015-12-28 12:00   ` Mika Westerberg
  2015-12-27 12:22 ` [PATCH 2/2] pinctrl: AMD: depend on Seattle or x86 Peter Robinson
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Robinson @ 2015-12-27 12:22 UTC (permalink / raw)
  To: Linus Walleij, linux-gpio, Mika Westerberg, Heikki Krogerus
  Cc: 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.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
 drivers/pinctrl/intel/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/pinctrl/intel/Kconfig b/drivers/pinctrl/intel/Kconfig
index 4d2efad..68fa13a 100644
--- a/drivers/pinctrl/intel/Kconfig
+++ b/drivers/pinctrl/intel/Kconfig
@@ -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
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] pinctrl: AMD: depend on Seattle or x86
  2015-12-27 12:22 pinctrl: adjust dependencies closer to arch/SoC Peter Robinson
  2015-12-27 12:22 ` [PATCH 1/2] pinctrl: intel: on enable on x86 arches and COMPILE_TEST Peter Robinson
@ 2015-12-27 12:22 ` Peter Robinson
  2016-01-05 14:58   ` Linus Walleij
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Robinson @ 2015-12-27 12:22 UTC (permalink / raw)
  To: Linus Walleij, linux-gpio, Mika Westerberg, Heikki Krogerus
  Cc: 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 <pbrobinson@gmail.com>
---
 drivers/pinctrl/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 312c78b..e02d1d4 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -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
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] pinctrl: intel: on enable on x86 arches and COMPILE_TEST
  2015-12-27 12:22 ` [PATCH 1/2] pinctrl: intel: on enable on x86 arches and COMPILE_TEST Peter Robinson
@ 2015-12-28 12:00   ` Mika Westerberg
  2015-12-28 12:13     ` Peter Robinson
  0 siblings, 1 reply; 7+ messages in thread
From: Mika Westerberg @ 2015-12-28 12:00 UTC (permalink / raw)
  To: Peter Robinson; +Cc: Linus Walleij, linux-gpio, Heikki Krogerus

On Sun, Dec 27, 2015 at 12:22:51PM +0000, Peter Robinson wrote:
> 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.
> 
> Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
> ---
>  drivers/pinctrl/intel/Kconfig | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/pinctrl/intel/Kconfig b/drivers/pinctrl/intel/Kconfig
> index 4d2efad..68fa13a 100644
> --- a/drivers/pinctrl/intel/Kconfig
> +++ b/drivers/pinctrl/intel/Kconfig
> @@ -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.

> @@ -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
> -- 
> 2.5.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] pinctrl: intel: on enable on x86 arches and COMPILE_TEST
  2015-12-28 12:00   ` Mika Westerberg
@ 2015-12-28 12:13     ` Peter Robinson
  2015-12-28 12:37       ` Mika Westerberg
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Robinson @ 2015-12-28 12:13 UTC (permalink / raw)
  To: Mika Westerberg; +Cc: Linus Walleij, linux-gpio, Heikki Krogerus

On Mon, Dec 28, 2015 at 12:00 PM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> On Sun, Dec 27, 2015 at 12:22:51PM +0000, Peter Robinson wrote:
>> 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.
>>
>> Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
>> ---
>>  drivers/pinctrl/intel/Kconfig | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/pinctrl/intel/Kconfig b/drivers/pinctrl/intel/Kconfig
>> index 4d2efad..68fa13a 100644
>> --- a/drivers/pinctrl/intel/Kconfig
>> +++ b/drivers/pinctrl/intel/Kconfig
>> @@ -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.

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

Peter

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] pinctrl: intel: on enable on x86 arches and COMPILE_TEST
  2015-12-28 12:13     ` Peter Robinson
@ 2015-12-28 12:37       ` Mika Westerberg
  0 siblings, 0 replies; 7+ messages in thread
From: Mika Westerberg @ 2015-12-28 12:37 UTC (permalink / raw)
  To: Peter Robinson; +Cc: Linus Walleij, linux-gpio, Heikki Krogerus

On Mon, Dec 28, 2015 at 12:13:32PM +0000, Peter Robinson wrote:
> On Mon, Dec 28, 2015 at 12:00 PM, Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
> > On Sun, Dec 27, 2015 at 12:22:51PM +0000, Peter Robinson wrote:
> >> 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.
> >>
> >> Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
> >> ---
> >>  drivers/pinctrl/intel/Kconfig | 4 ++++
> >>  1 file changed, 4 insertions(+)
> >>
> >> diff --git a/drivers/pinctrl/intel/Kconfig b/drivers/pinctrl/intel/Kconfig
> >> index 4d2efad..68fa13a 100644
> >> --- a/drivers/pinctrl/intel/Kconfig
> >> +++ b/drivers/pinctrl/intel/Kconfig
> >> @@ -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.
> 
> 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).

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] pinctrl: AMD: depend on Seattle or x86
  2015-12-27 12:22 ` [PATCH 2/2] pinctrl: AMD: depend on Seattle or x86 Peter Robinson
@ 2016-01-05 14:58   ` Linus Walleij
  0 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2016-01-05 14:58 UTC (permalink / raw)
  To: Peter Robinson
  Cc: linux-gpio@vger.kernel.org, Mika Westerberg, Heikki Krogerus

On Sun, Dec 27, 2015 at 1:22 PM, Peter Robinson <pbrobinson@gmail.com> wrote:

> 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 <pbrobinson@gmail.com>
(...)
> -       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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-01-05 14:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-27 12:22 pinctrl: adjust dependencies closer to arch/SoC Peter Robinson
2015-12-27 12:22 ` [PATCH 1/2] pinctrl: intel: on enable on x86 arches and COMPILE_TEST Peter Robinson
2015-12-28 12:00   ` Mika Westerberg
2015-12-28 12:13     ` Peter Robinson
2015-12-28 12:37       ` Mika Westerberg
2015-12-27 12:22 ` [PATCH 2/2] pinctrl: AMD: depend on Seattle or x86 Peter Robinson
2016-01-05 14:58   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).