From patchwork Mon Feb 15 15:46:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102780 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1142536lbl; Mon, 15 Feb 2016 07:48:27 -0800 (PST) X-Received: by 10.66.63.67 with SMTP id e3mr23665203pas.141.1455551307826; Mon, 15 Feb 2016 07:48:27 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kw7si29517465pab.74.2016.02.15.07.48.27; Mon, 15 Feb 2016 07:48:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752460AbcBOPsY (ORCPT + 30 others); Mon, 15 Feb 2016 10:48:24 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:63690 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752400AbcBOPsV (ORCPT ); Mon, 15 Feb 2016 10:48:21 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0Lst7y-1ZprZ92QdW-012cSf; Mon, 15 Feb 2016 16:47:49 +0100 From: Arnd Bergmann To: Linus Walleij , Russell King Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Russell King , Bjorn Helgaas , Alexandre Courbot , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: [PATCH 4/4] ARM: remove asm/gpio.h Date: Mon, 15 Feb 2016 16:46:31 +0100 Message-Id: <1455551208-2825510-5-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455551208-2825510-1-git-send-email-arnd@arndb.de> References: <20160202194831.10827.63244.stgit@bhelgaas-glaptop2.roam.corp.google.com> <1455551208-2825510-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:FHAaXw0GrACqHV1trk+vjzrToeNpKZGpydevbObAKFN9Ynakazm q+3RRyEUPjEgzj+3oBIdyI4SzgK1b1BJdDlYaqFh1PWvOu2UHV5QU2DslBmEAsfZBijY2eI mcdMHVDT+ZBNOpo4zOJHFYWFGJr2bGqZvjm6EhiqLRgJfKBFG06hly9JKswLzVeQTFX4vAk CHY6SyiqdnIJpm2tidFsA== X-UI-Out-Filterresults: notjunk:1; V01:K0:8y6EeCKOpiU=:8uLZMDykrYc96rM0FPgmIl lP3HpiVD9zISLV4gfzY7mEF6gmj1FBxqd/bjyJ0MZEA+rSaAHOhzRSXXKBm1uUHlrY6X9KJSG Fp5SRCdN+nnB3eCkbLnYrNHw4VL2EddHBEs+it+7WrR3F0TaW3FCc0C22Fx6ZegpQgnStGB07 M2voFQ2aKXzWXXOjwYzhsuQjKVezORDYOyfTZFW7rHoqcEtAoVJAaWDT9LqSYRcMkj/ORP6iP SiehyHPt526RsK7vUQp2t0hPsrSZ1sXnQccnOC1sivWHKRFF86JdHON/vQvgXSz+Nhjg18Giy 5ceXtuqOinau97rWe+pFV2YeHKUHvGwEWD8ODr760/mlPZBkHf9Ujd1gHzM9zRqxBIRmH2eK7 0anhmj+iuG9d48od7pJwD9yH8EwGda0qh9x7B2Li3RNbin0cx/bXphqvD5QfjY/z6DjmUcwcB 5X5t0E1L1v6D1SlBOtwe85MY+AB9OiwOsUfTdOirbo3EpQtTaNCykAySkhOG5K09xZVDd+XpJ lpisaJNEu1ueBlkFVvt2+xDxQKjWiJh/cgxXM1wpOWFCzzO0nxa9TBbxq6qMqS5AizD69PL7D cMdNKL+ZJi9+XtzAZ5pp2CIlxGBoIk7Ao4SC4ryrOD44BJf1ese1pUmUd4lw7rXu467M+4h3X RGW8qHyLNiGkJVTNa1pyQAKPQmkBzFWg2hBn+hz5QTJcP+muiqRTdWwkIqfPXYqwoQac= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, and removes the ARM version at the same time. This patch depends on a series done by Bjorn Helgaas, and the patch removing irq_to_gpio(). Signed-off-by: Arnd Bergmann --- arch/arm/Kconfig | 1 - arch/arm/include/asm/gpio.h | 25 ------------------------- include/asm-generic/gpio.h | 4 ++++ 3 files changed, 4 insertions(+), 26 deletions(-) delete mode 100644 arch/arm/include/asm/gpio.h -- 2.7.0 diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 0366ad63e2ed..27aefbe43eea 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -5,7 +5,6 @@ config ARM select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAS_ELF_RANDOMIZE select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST - select ARCH_HAVE_CUSTOM_GPIO_H select ARCH_HAS_GCOV_PROFILE_ALL select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_SUPPORTS_ATOMIC_RMW diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h deleted file mode 100644 index 504dcddebfcc..000000000000 --- a/arch/arm/include/asm/gpio.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef _ARCH_ARM_GPIO_H -#define _ARCH_ARM_GPIO_H - -#if CONFIG_ARCH_NR_GPIO > 0 -#define ARCH_NR_GPIOS CONFIG_ARCH_NR_GPIO -#endif - -/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */ -#include - -/* The trivial gpiolib dispatchers */ -#define gpio_get_value __gpio_get_value -#define gpio_set_value __gpio_set_value -#define gpio_cansleep __gpio_cansleep - -/* - * Provide a default gpio_to_irq() which should satisfy every case. - * However, some platforms want to do this differently, so allow them - * to override it. - */ -#ifndef gpio_to_irq -#define gpio_to_irq __gpio_to_irq -#endif - -#endif /* _ARCH_ARM_GPIO_H */ diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 40ec1433f05d..2d04b321db13 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -26,8 +26,12 @@ */ #ifndef ARCH_NR_GPIOS +#ifdef CONFIG_ARCH_NR_GPIO +#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