All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: Do not depend in GPIOLIB, select it
@ 2017-10-11 10:07 Linus Walleij
  2017-10-11 13:17 ` Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Linus Walleij @ 2017-10-11 10:07 UTC (permalink / raw)
  To: linux-gpio
  Cc: Linus Walleij, Phil Reid, Sebastian Reichel, Mika Westerberg,
	Andy Shevchenko, Peter Rosin, Andrey Smirnov

Instead of depends on GPIOLIB and having to run around in
Kconfig menus looking for why your device is not available,
simply select it from the pin control drivers that need it.

The Kconfig for GPIOLIB is improved, selectable and this
should "just work".

Cc: Phil Reid <preid@electromag.com.au>
Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Peter Rosin <peda@axentia.se>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/pinctrl/Kconfig       | 6 ++++--
 drivers/pinctrl/intel/Kconfig | 3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 8da29e9e1bb2..034822c7144d 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -97,7 +97,7 @@ config PINCTRL_AT91PIO4
 
 config PINCTRL_AMD
 	tristate "AMD GPIO pin control"
-	depends on GPIOLIB
+	select GPIOLIB
 	select GPIOLIB_IRQCHIP
 	select PINCONF
 	select GENERIC_PINCONF
@@ -156,6 +156,7 @@ config PINCTRL_MCP23S08
 	tristate "Microchip MCP23xxx I/O expander"
 	depends on SPI_MASTER || I2C
 	depends on I2C || I2C=n
+	select GPIOLIB
 	select GPIOLIB_IRQCHIP
 	select REGMAP_I2C if I2C
 	select REGMAP_SPI if SPI_MASTER
@@ -224,10 +225,11 @@ config PINCTRL_SIRF
 
 config PINCTRL_SX150X
 	bool "Semtech SX150x I2C GPIO expander pinctrl driver"
-	depends on GPIOLIB && I2C=y
+	depends on I2C=y
 	select PINMUX
 	select PINCONF
 	select GENERIC_PINCONF
+	select GPIOLIB
 	select GPIOLIB_IRQCHIP
 	select REGMAP
 	help
diff --git a/drivers/pinctrl/intel/Kconfig b/drivers/pinctrl/intel/Kconfig
index f30720a752f3..7fb1b9937c39 100644
--- a/drivers/pinctrl/intel/Kconfig
+++ b/drivers/pinctrl/intel/Kconfig
@@ -5,7 +5,8 @@ if (X86 || COMPILE_TEST)
 
 config PINCTRL_BAYTRAIL
 	bool "Intel Baytrail GPIO pin control"
-	depends on GPIOLIB && ACPI
+	depends on ACPI
+	select GPIOLIB
 	select GPIOLIB_IRQCHIP
 	select PINMUX
 	select PINCONF
-- 
2.13.5


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

* Re: [PATCH] pinctrl: Do not depend in GPIOLIB, select it
  2017-10-11 10:07 [PATCH] pinctrl: Do not depend in GPIOLIB, select it Linus Walleij
@ 2017-10-11 13:17 ` Andy Shevchenko
  2017-10-12  7:16   ` Linus Walleij
  2017-10-11 18:59 ` Mika Westerberg
  2017-10-12 22:20 ` Bjorn Andersson
  2 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2017-10-11 13:17 UTC (permalink / raw)
  To: Linus Walleij, linux-gpio
  Cc: Phil Reid, Sebastian Reichel, Mika Westerberg, Peter Rosin,
	Andrey Smirnov

On Wed, 2017-10-11 at 12:07 +0200, Linus Walleij wrote:
> Instead of depends on GPIOLIB and having to run around in
> Kconfig menus looking for why your device is not available,
> simply select it from the pin control drivers that need it.
> 
> The Kconfig for GPIOLIB is improved, selectable and this
> should "just work".
> 
> Cc: Phil Reid <preid@electromag.com.au>
> Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Peter Rosin <peda@axentia.se>
> Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Fine by me:
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

P.S. Linus, btw, are you going to ELC 2017 Europe (Prague)?

> ---
>  drivers/pinctrl/Kconfig       | 6 ++++--
>  drivers/pinctrl/intel/Kconfig | 3 ++-
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
> index 8da29e9e1bb2..034822c7144d 100644
> --- a/drivers/pinctrl/Kconfig
> +++ b/drivers/pinctrl/Kconfig
> @@ -97,7 +97,7 @@ config PINCTRL_AT91PIO4
>  
>  config PINCTRL_AMD
>  	tristate "AMD GPIO pin control"
> -	depends on GPIOLIB
> +	select GPIOLIB
>  	select GPIOLIB_IRQCHIP
>  	select PINCONF
>  	select GENERIC_PINCONF
> @@ -156,6 +156,7 @@ config PINCTRL_MCP23S08
>  	tristate "Microchip MCP23xxx I/O expander"
>  	depends on SPI_MASTER || I2C
>  	depends on I2C || I2C=n
> +	select GPIOLIB
>  	select GPIOLIB_IRQCHIP
>  	select REGMAP_I2C if I2C
>  	select REGMAP_SPI if SPI_MASTER
> @@ -224,10 +225,11 @@ config PINCTRL_SIRF
>  
>  config PINCTRL_SX150X
>  	bool "Semtech SX150x I2C GPIO expander pinctrl driver"
> -	depends on GPIOLIB && I2C=y
> +	depends on I2C=y
>  	select PINMUX
>  	select PINCONF
>  	select GENERIC_PINCONF
> +	select GPIOLIB
>  	select GPIOLIB_IRQCHIP
>  	select REGMAP
>  	help
> diff --git a/drivers/pinctrl/intel/Kconfig
> b/drivers/pinctrl/intel/Kconfig
> index f30720a752f3..7fb1b9937c39 100644
> --- a/drivers/pinctrl/intel/Kconfig
> +++ b/drivers/pinctrl/intel/Kconfig
> @@ -5,7 +5,8 @@ if (X86 || COMPILE_TEST)
>  
>  config PINCTRL_BAYTRAIL
>  	bool "Intel Baytrail GPIO pin control"
> -	depends on GPIOLIB && ACPI
> +	depends on ACPI
> +	select GPIOLIB
>  	select GPIOLIB_IRQCHIP
>  	select PINMUX
>  	select PINCONF

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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

* Re: [PATCH] pinctrl: Do not depend in GPIOLIB, select it
  2017-10-11 10:07 [PATCH] pinctrl: Do not depend in GPIOLIB, select it Linus Walleij
  2017-10-11 13:17 ` Andy Shevchenko
@ 2017-10-11 18:59 ` Mika Westerberg
  2017-10-12 22:20 ` Bjorn Andersson
  2 siblings, 0 replies; 5+ messages in thread
From: Mika Westerberg @ 2017-10-11 18:59 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-gpio, Phil Reid, Sebastian Reichel, Andy Shevchenko,
	Peter Rosin, Andrey Smirnov

On Wed, Oct 11, 2017 at 12:07:42PM +0200, Linus Walleij wrote:
> Instead of depends on GPIOLIB and having to run around in
> Kconfig menus looking for why your device is not available,
> simply select it from the pin control drivers that need it.
> 
> The Kconfig for GPIOLIB is improved, selectable and this
> should "just work".
> 
> Cc: Phil Reid <preid@electromag.com.au>
> Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

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

* Re: [PATCH] pinctrl: Do not depend in GPIOLIB, select it
  2017-10-11 13:17 ` Andy Shevchenko
@ 2017-10-12  7:16   ` Linus Walleij
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2017-10-12  7:16 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-gpio, Phil Reid, Sebastian Reichel, Mika Westerberg,
	Peter Rosin, Andrey Smirnov

On Wed, Oct 11, 2017 at 3:17 PM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> P.S. Linus, btw, are you going to ELC 2017 Europe (Prague)?

Sadly not this year. Too much travelling and too little work,
so had to focus a bit on work/life-balance and getting some
serious coding done this year.

Yours,
Linus Walleij

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

* Re: [PATCH] pinctrl: Do not depend in GPIOLIB, select it
  2017-10-11 10:07 [PATCH] pinctrl: Do not depend in GPIOLIB, select it Linus Walleij
  2017-10-11 13:17 ` Andy Shevchenko
  2017-10-11 18:59 ` Mika Westerberg
@ 2017-10-12 22:20 ` Bjorn Andersson
  2 siblings, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2017-10-12 22:20 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-gpio, Phil Reid, Sebastian Reichel, Mika Westerberg,
	Andy Shevchenko, Peter Rosin, Andrey Smirnov

On Wed, Oct 11, 2017 at 3:07 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
>
> Instead of depends on GPIOLIB and having to run around in
> Kconfig menus looking for why your device is not available,
> simply select it from the pin control drivers that need it.
>
> The Kconfig for GPIOLIB is improved, selectable and this
> should "just work".
>

It's generally frowned upon to select a user-selectable option, but as
long as GPIOLIB doesn't "depends on" anything it should be fine.

Regards,
Bjorn

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

end of thread, other threads:[~2017-10-12 22:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-11 10:07 [PATCH] pinctrl: Do not depend in GPIOLIB, select it Linus Walleij
2017-10-11 13:17 ` Andy Shevchenko
2017-10-12  7:16   ` Linus Walleij
2017-10-11 18:59 ` Mika Westerberg
2017-10-12 22:20 ` Bjorn Andersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.