From patchwork Wed Apr 20 08:58:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 66206 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2325595qge; Wed, 20 Apr 2016 01:59:43 -0700 (PDT) X-Received: by 10.98.91.3 with SMTP id p3mr10585212pfb.64.1461142765592; Wed, 20 Apr 2016 01:59:25 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1si19268993pfb.185.2016.04.20.01.59.25; Wed, 20 Apr 2016 01:59:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932850AbcDTI7Y (ORCPT + 4 others); Wed, 20 Apr 2016 04:59:24 -0400 Received: from mail-lb0-f180.google.com ([209.85.217.180]:36226 "EHLO mail-lb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932976AbcDTI7V (ORCPT ); Wed, 20 Apr 2016 04:59:21 -0400 Received: by mail-lb0-f180.google.com with SMTP id ys16so5552472lbb.3 for ; Wed, 20 Apr 2016 01:59:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9IzXxiPxW64jl/Vh1mgBJGG2wFtNfr7Pros/FzcLvwE=; b=IVyVVVsv5oGT8tf34xIVp3HUkcpIL7m1GY//CkY1CaU/wLuA3xz34UjE0TZYjnhfp2 GuBWiadD2lF9KS67dJ6Ph3tAH5PA6a3hcE/+XR6ZzMPkWEwcU6nrStGTEa8YsrH+UsM9 F4blHwHEHRhpcM+4jDr0fM+NF0uOgyTi+oTkc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9IzXxiPxW64jl/Vh1mgBJGG2wFtNfr7Pros/FzcLvwE=; b=OUInCjbHeMJGf59ZyEAyAlFPMvQQK11L28kp2PACkRnYsbQAwjoS5comTdMvybJadX mjkKgFGVVM8dJIgsKok1dYMFLJV5FmVzlLFlcPMA9AQIBcNSs2hhmiN+4bHyZWPbrsYZ Hv6sIseUQyhqyckZUfA+kLRdEEtSXPBQylJnxDkCOS6PgbYsu8CEpVkwiU1o3BYbAZjX nWgREZZWyMrnLStEVSpfiGtZE/KVL1XzKxq6PiT3rHZ7TAfhPj5V46n1e1Oi2AJ5yyU/ 3BtYJqSNQ7+pp3/YI0r1gP0zXbNI8dZOhZuQek9hNB4LlGbb8i/MSD86V83ZJTaPmNbS eefQ== X-Gm-Message-State: AOPr4FVHoNcLDLk6M0VGh7aZ6dhH14TtqOrLVJPi0I0e5cxqBmxtvDDsCc2N1eFm4Cxe8Nol X-Received: by 10.112.198.132 with SMTP id jc4mr3225264lbc.120.1461142758889; Wed, 20 Apr 2016 01:59:18 -0700 (PDT) Received: from localhost.localdomain ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id z8sm849934lbv.42.2016.04.20.01.59.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Apr 2016 01:59:18 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org, Alexandre Courbot Cc: Linus Walleij , =?UTF-8?q?Michael=20B=C3=BCsch?= Subject: [PATCH 23/23] gpio: delete ARCH_[WANTS_OPTIONAL|REQUIRE]_GPIOLIB Date: Wed, 20 Apr 2016 10:58:21 +0200 Message-Id: <1461142701-21096-24-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.11 In-Reply-To: <1461142701-21096-1-git-send-email-linus.walleij@linaro.org> References: <1461142701-21096-1-git-send-email-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.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 Signed-off-by: Linus Walleij --- Documentation/gpio/board.txt | 6 +++--- Documentation/gpio/gpio-legacy.txt | 16 ++++------------ drivers/gpio/Kconfig | 21 --------------------- 3 files changed, 7 insertions(+), 36 deletions(-) -- 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 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 includes 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