All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: linux-gpio@vger.kernel.org, Alexandre Courbot <acourbot@nvidia.com>
Cc: "Linus Walleij" <linus.walleij@linaro.org>, "Michael Büsch" <m@bues.ch>
Subject: [PATCH 23/23] gpio: delete ARCH_[WANTS_OPTIONAL|REQUIRE]_GPIOLIB
Date: Wed, 20 Apr 2016 10:58:21 +0200	[thread overview]
Message-ID: <1461142701-21096-24-git-send-email-linus.walleij@linaro.org> (raw)
In-Reply-To: <1461142701-21096-1-git-send-email-linus.walleij@linaro.org>

The GPIOLIB is now selectable explicitly, and always available
for all archs. All archs that require GPIOLIB are switched to
select GPIOLIB directly. Delete the hairy ARCH_REQUIRE_GPIOLIB
and ARCH_WANTS_OPTIONAL_GPIOLIB Kconfig symbols.

Cc: Michael Büsch <m@bues.ch>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 Documentation/gpio/board.txt       |  6 +++---
 Documentation/gpio/gpio-legacy.txt | 16 ++++------------
 drivers/gpio/Kconfig               | 21 ---------------------
 3 files changed, 7 insertions(+), 36 deletions(-)

diff --git a/Documentation/gpio/board.txt b/Documentation/gpio/board.txt
index 86d3fa95fd12..40884c4fe40c 100644
--- a/Documentation/gpio/board.txt
+++ b/Documentation/gpio/board.txt
@@ -8,9 +8,9 @@ gpio-legacy.txt (actually, there is no real mapping possible with the old
 interface; you just fetch an integer from somewhere and request the
 corresponding GPIO.
 
-Platforms that make use of GPIOs must select ARCH_REQUIRE_GPIOLIB (if GPIO usage
-is mandatory) or ARCH_WANT_OPTIONAL_GPIOLIB (if GPIO support can be omitted) in
-their Kconfig. Then, how GPIOs are mapped depends on what the platform uses to
+All platforms can enable the GPIO library, but if the platform strictly
+requires GPIO functionality to be present, it needs to select GPIOLIB from its
+Kconfig. Then, how GPIOs are mapped depends on what the platform uses to
 describe its hardware layout. Currently, mappings can be defined through device
 tree, ACPI, and platform data.
 
diff --git a/Documentation/gpio/gpio-legacy.txt b/Documentation/gpio/gpio-legacy.txt
index 79ab5648d69b..b34fd94f7089 100644
--- a/Documentation/gpio/gpio-legacy.txt
+++ b/Documentation/gpio/gpio-legacy.txt
@@ -72,8 +72,8 @@ in this document, but drivers acting as clients to the GPIO interface must
 not care how it's implemented.)
 
 That said, if the convention is supported on their platform, drivers should
-use it when possible.  Platforms must select ARCH_REQUIRE_GPIOLIB or
-ARCH_WANT_OPTIONAL_GPIOLIB in their Kconfig.  Drivers that can't work without
+use it when possible.  Platforms must select GPIOLIB if GPIO functionality
+is strictly required.  Drivers that can't work without
 standard GPIO calls should have Kconfig entries which depend on GPIOLIB.  The
 GPIO calls are available, either as "real code" or as optimized-away stubs,
 when drivers use the include file:
@@ -553,22 +553,14 @@ either NULL or the label associated with that GPIO when it was requested.
 
 Platform Support
 ----------------
-To support this framework, a platform's Kconfig will "select" either
-ARCH_REQUIRE_GPIOLIB or ARCH_WANT_OPTIONAL_GPIOLIB
-and arrange that its <asm/gpio.h> includes <asm-generic/gpio.h> and defines
-three functions: gpio_get_value(), gpio_set_value(), and gpio_cansleep().
+To force-enable this framework, a platform's Kconfig will "select" GPIOLIB,
+else it is up to the user to configure support for GPIO.
 
 It may also provide a custom value for ARCH_NR_GPIOS, so that it better
 reflects the number of GPIOs in actual use on that platform, without
 wasting static table space.  (It should count both built-in/SoC GPIOs and
 also ones on GPIO expanders.
 
-ARCH_REQUIRE_GPIOLIB means that the gpiolib code will always get compiled
-into the kernel on that architecture.
-
-ARCH_WANT_OPTIONAL_GPIOLIB means the gpiolib code defaults to off and the user
-can enable it and build it into the kernel optionally.
-
 If neither of these options are selected, the platform does not support
 GPIOs through GPIO-lib and the code cannot be enabled by the user.
 
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index a68d83808f37..711995e39cf9 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -10,27 +10,6 @@ config ARCH_HAVE_CUSTOM_GPIO_H
 	  overriding the default implementations.  New uses of this are
 	  strongly discouraged.
 
-config ARCH_WANT_OPTIONAL_GPIOLIB
-	bool
-	help
-	  Select this config option from the architecture Kconfig, if
-	  it is possible to use gpiolib on the architecture, but let the
-	  user decide whether to actually build it or not.
-	  Select this instead of ARCH_REQUIRE_GPIOLIB, if your architecture does
-	  not depend on GPIOs being available, but rather let the user
-	  decide whether he needs it or not.
-
-config ARCH_REQUIRE_GPIOLIB
-	bool
-	select GPIOLIB
-	help
-	  Platforms select gpiolib if they use this infrastructure
-	  for all their GPIOs, usually starting with ones integrated
-	  into SOC processors.
-	  Selecting this from the architecture code will cause the gpiolib
-	  code to always get built in.
-
-
 menuconfig GPIOLIB
 	bool "GPIO Support"
 	help
-- 
2.4.11

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2016-04-20  8:59 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20  8:57 [PATCH 00/23] Kill ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB Linus Walleij
2016-04-20  8:57 ` [PATCH 01/23] gpio: remove deps on ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB Linus Walleij
2016-04-20  8:58 ` [PATCH 02/23] arc: select GPIOLIB directly Linus Walleij
2016-04-20  8:58   ` Linus Walleij
2016-04-22  5:16   ` Vineet Gupta
2016-04-22  5:16     ` Vineet Gupta
2016-04-26 12:09     ` Linus Walleij
2016-04-26 12:09       ` Linus Walleij
2016-04-20  8:58 ` [PATCH 03/23] ARM: do away with ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB Linus Walleij
2016-04-20  8:58   ` Linus Walleij
2016-04-20  8:58 ` [PATCH 04/23] arm64: " Linus Walleij
2016-04-20  8:58 ` [PATCH 05/23] avr32: do away with ARCH_REQUIRE_GPIOLIB Linus Walleij
2016-04-20  9:09   ` Hans-Christian Noren Egtvedt
2016-04-26 11:38     ` Linus Walleij
2016-04-20  8:58 ` [PATCH 06/23] blackfin: " Linus Walleij
2016-04-20  8:58 ` [PATCH 07/23] cris: " Linus Walleij
2016-04-21 14:05   ` Jesper Nilsson
2016-04-26 12:04     ` Linus Walleij
2016-04-20  8:58 ` [PATCH 08/23] hexagon: update TODO list Linus Walleij
2016-04-20  8:58   ` Linus Walleij
2016-04-20  8:58 ` [PATCH 09/23] m68k: do away with ARCH_REQUIRE_GPIOLIB Linus Walleij
2016-04-20  8:58 ` Linus Walleij
2016-04-21  1:12   ` Greg Ungerer
2016-04-26 12:02     ` Linus Walleij
2016-04-26 12:02     ` Linus Walleij
2016-04-21  1:12   ` Greg Ungerer
2016-04-20  8:58 ` [PATCH 10/23] MIPS: do away with ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB Linus Walleij
2016-04-20  8:58   ` Linus Walleij
2016-05-10  8:05   ` Ralf Baechle
2016-05-10  8:05     ` Ralf Baechle
2016-04-20  8:58 ` [PATCH 11/23] openrisc: do away with ARCH_REQUIRE_GPIOLIB Linus Walleij
2016-04-20  8:58 ` [PATCH 12/23] powerpc: do away with ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB Linus Walleij
2016-04-20  8:58   ` Linus Walleij
2016-04-20  8:58 ` [PATCH 13/23] sh: " Linus Walleij
2016-04-20  8:58   ` Linus Walleij
2016-04-20  8:58 ` [PATCH 14/23] unicore: do away with ARCH_REQUIRE_GPIOLIB Linus Walleij
2016-04-20  8:58 ` [PATCH 15/23] x86: do away with ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB Linus Walleij
2016-04-20  8:58 ` [PATCH 16/23] alpha: remove ARCH_WANT_OPTIONAL_GPIOLIB Linus Walleij
2016-04-20  8:58   ` Linus Walleij
2016-04-20 16:15   ` Matt Turner
2016-04-26 11:59     ` Linus Walleij
2016-04-20  8:58 ` [PATCH 17/23] ia64: " Linus Walleij
2016-04-20  8:58   ` Linus Walleij
2016-04-20  8:58 ` [PATCH 18/23] metag: " Linus Walleij
2016-04-20  8:58   ` Linus Walleij
     [not found]   ` <1461142701-21096-19-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-04-20  9:26     ` James Hogan
     [not found]       ` <20160420092602.GX7859-4bYivNCBEGTR3KXKvIWQxtm+Uo4AYnCiHZ5vskTnxNA@public.gmane.org>
2016-04-26 11:40         ` Linus Walleij
2016-04-26 11:40           ` Linus Walleij
2016-04-20  8:58 ` [PATCH 19/23] microblaze: " Linus Walleij
2016-04-20  8:58 ` [PATCH 20/23] nios2: " Linus Walleij
2016-04-21  7:46   ` Ley Foon Tan
2016-04-26 12:03     ` Linus Walleij
2016-04-20  8:58 ` [PATCH 21/23] sparc: " Linus Walleij
2016-04-20  8:58   ` Linus Walleij
2016-04-21 18:58   ` David Miller
2016-04-21 18:58     ` David Miller
2016-04-26 12:07     ` Linus Walleij
2016-04-26 12:07       ` Linus Walleij
2016-04-20  8:58 ` [PATCH 22/23] xtensa: " Linus Walleij
2016-04-20 19:00   ` Max Filippov
2016-04-26 12:00     ` Linus Walleij
2016-04-20  8:58 ` Linus Walleij [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461142701-21096-24-git-send-email-linus.walleij@linaro.org \
    --to=linus.walleij@linaro.org \
    --cc=acourbot@nvidia.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=m@bues.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.