From patchwork Tue Feb 16 15:40:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8328321 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E0674C02AA for ; Tue, 16 Feb 2016 15:44:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A4E720295 for ; Tue, 16 Feb 2016 15:44:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 38D3F202BE for ; Tue, 16 Feb 2016 15:44:22 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aVhm6-0007G8-Bt; Tue, 16 Feb 2016 15:42:50 +0000 Received: from mout.kundenserver.de ([212.227.126.135]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aVhlF-0006dV-46 for linux-arm-kernel@lists.infradead.org; Tue, 16 Feb 2016 15:41:58 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0Lvfyq-1ZvXbL3W6W-017XtC; Tue, 16 Feb 2016 16:41:32 +0100 From: Arnd Bergmann To: Linus Walleij Subject: [PATCH v2 5/5] gpio: allow setting ARCH_NR_GPIOS from Kconfig Date: Tue, 16 Feb 2016 16:40:38 +0100 Message-Id: <1455637261-2920972-5-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455637261-2920972-1-git-send-email-arnd@arndb.de> References: <455637086-2794174-1-git-send-email-arnd@arndb.de> <1455637261-2920972-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:e9I4n9sy6PyfgfkQLus4LmFKwzxjGnLahn87Oh+4EEz/dEqZzmI LtnORHyhCGaFgmUaH5Ihrjgy7613+uzJecPpIVM2X+Xx8EcpoO9BD5nEgbnXW4tr0ewq7UK m5WTq6i2c2QuL9MfeyxJgpViae6H/T7kxu9Yu45wrUbtMwByfdIyIBjULFfEfyEVxlW4VXf DiYm2g/2zC+4bpKMDAVMg== X-UI-Out-Filterresults: notjunk:1; V01:K0:t6Cj3QeaQKw=:I+oXVxtRdcp0uPYz95qpLK G5wlMx5OOjmurCFCNs8JulEdslbXS6tP+F8HYlbpf9c2B8v7vHJvBDyz8rm3TMzEfufqtR63T 25d+E3pDQYFchwhhdxtgfSZBG7klAZLQawXA9l39z0WUTwpRWtBTOyMyx3zlpZEXKbALutpGP Mw22GxLl6ZEXVP6YW0oZGGnGYuMTEYzVjdZBr7UCExWmvtVyJMOZDMO4psfHcRCackMtWz7rZ B08HEXwKfH4n83Hnjtft/zjqR3nzekQO96+0UEks/qqznwF8rASWSDI0uLDMEcqcZHLCpgpZD kbTkZgnNnGX4wpaK8oq3ZO+tC7uYHOdr7OUrsVdsnebR+WSyrQ9nSZp0S4mhTDMwUebEbvPYr 2aWELeMj/dTrVCxaPRYFey48jJfJLdW531WHbGfwJIRcvwC8ukL7e7rZTKqTCl2Twtld+/mE6 eR3y3Rfy41YxwCGxdbJnjekPuJXF92sfRRhsI0CWil4YW+LqoFWuQGoStsrqlPfmMgbAKSRq5 jF/cwF+46TJABq72sMAoDidh0kk2tJZ2stCCSnwCrEEwysAwUDPBC0ldPQl+Ug01JNMiBhinS e6K8gmcLcmv5iQ8Z6ZKVBTwnIKMNuuBtiTKTeI1g8nZQDz2Ea8pkrSKAOPxMikAC5p7QFqeOI Mm+/hGhfN9B4ibsir0HPgBCCKP6MqzsBVcpI+SR34bWDoqQC2r3pt1NCqxdx1O1pVn9M= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160216_074157_680778_5F048821 X-CRM114-Status: GOOD ( 10.17 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Alexandre Courbot , Lars-Peter Clausen , Arnd Bergmann , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Ralf Baechle , linux-gpio@vger.kernel.org, Bjorn Helgaas , Russell King , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The ARM version of asm/gpio.h basically just contains the same definitions as the gpiolib version, with the exception of ARCH_NR_GPIOS. This adds the option for overriding the constant through Kconfig to the architecture-independent header, so we can remove the ARM specific file later. Signed-off-by: Arnd Bergmann --- include/asm-generic/gpio.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 40ec1433f05d..8ca627dcea11 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -26,8 +26,12 @@ */ #ifndef ARCH_NR_GPIOS +#if defined(CONFIG_ARCH_NR_GPIO) && CONFIG_ARCH_NR_GPIO > 0 +#define ARCH_NR_GPIOS CONFIG_ARCH_NR_GPIO +#else #define ARCH_NR_GPIOS 512 #endif +#endif /* * "valid" GPIO numbers are nonnegative and may be passed to