From patchwork Fri Sep 20 20:17:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 20486 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0831E25DFC for ; Fri, 20 Sep 2013 20:18:01 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id lf12sf823833vcb.2 for ; Fri, 20 Sep 2013 13:18:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=c5FV3zom0ZoL66yTJJp4kx239rnOzuIkznLk6n/8L9g=; b=eBczbNcszKMUaVZOo+bStXG/VX6WX+VQ2qPkElUmXBNJgMFX6oaK9d6vtk4/WWrlrl NM2KJv3NdvBwXmgNgnG/aKKeTt9+BkZ22NqsIwvgMxNUSyjHqqr+/P2IMi7PV3haTwI4 kRFOCG0tfbLul3FSQOSZXlK14FObH9DuED64sUTD6z6+qLm2JIk2UVsqSKidFukWhh6e k2TL9ga97t/Fm5WFGkyk3DL7JmMyiAJrTxSba155BKZjNMZRcfi7rL6RI9K+tLyOxfl2 HzizeHVo7FoLclT6WcYK5iCvTRb/tADxhBhTY3Z7AHn1taz4PMPcGvTRLxy1hzv6Kq0r nzRg== X-Gm-Message-State: ALoCoQltjYYtiE0mNiS7GoB9RHC6Sn19RLmhLIej5vfWCSWezlg4Ke3TQOh3PzzL2/JZaMwzer07 X-Received: by 10.58.180.4 with SMTP id dk4mr604641vec.20.1379708280868; Fri, 20 Sep 2013 13:18:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.35.10 with SMTP id d10ls449244qej.19.gmail; Fri, 20 Sep 2013 13:18:00 -0700 (PDT) X-Received: by 10.220.164.202 with SMTP id f10mr2208846vcy.25.1379708280737; Fri, 20 Sep 2013 13:18:00 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id lu1si3400446vcb.13.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Sep 2013 13:18:00 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.179; Received: by mail-ve0-f179.google.com with SMTP id c14so724321vea.24 for ; Fri, 20 Sep 2013 13:18:00 -0700 (PDT) X-Received: by 10.52.173.165 with SMTP id bl5mr7025397vdc.18.1379708280621; Fri, 20 Sep 2013 13:18:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp36808vcz; Fri, 20 Sep 2013 13:18:00 -0700 (PDT) X-Received: by 10.15.83.2 with SMTP id b2mr13229861eez.28.1379708279687; Fri, 20 Sep 2013 13:17:59 -0700 (PDT) Received: from mail-ee0-f48.google.com (mail-ee0-f48.google.com [74.125.83.48]) by mx.google.com with ESMTPS id b42si1775266eem.132.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Sep 2013 13:17:59 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.48 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=74.125.83.48; Received: by mail-ee0-f48.google.com with SMTP id l10so482685eei.7 for ; Fri, 20 Sep 2013 13:17:59 -0700 (PDT) X-Received: by 10.14.175.73 with SMTP id y49mr13170383eel.50.1379708279143; Fri, 20 Sep 2013 13:17:59 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id z12sm21961425eev.6.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 20 Sep 2013 13:17:58 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org, Lennert Buytenhek , Dan Williams , Mikael Pettersson , Aaro Koskinen Cc: Alexandre Courbot , linux-arm-kernel@lists.infradead.org, Linus Walleij Subject: [PATCH 5/8] ARM: plat-iop: remove custom complex GPIO implementation Date: Fri, 20 Sep 2013 22:17:55 +0200 Message-Id: <1379708275-8008-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The kernel will now only use gpiolib to access GPIOs, so remove the complex GPIO flag and the custom implementation. Cc: Aaro Koskinen Cc: Lennert Buytenhek Cc: Dan Williams Cc: Mikael Pettersson Signed-off-by: Linus Walleij --- arch/arm/include/asm/hardware/iop3xx-gpio.h | 43 ----------------------------- arch/arm/include/asm/hardware/iop3xx.h | 3 -- drivers/gpio/gpio-iop.c | 9 ++---- 3 files changed, 3 insertions(+), 52 deletions(-) diff --git a/arch/arm/include/asm/hardware/iop3xx-gpio.h b/arch/arm/include/asm/hardware/iop3xx-gpio.h index 9eda7dc..e2a0970 100644 --- a/arch/arm/include/asm/hardware/iop3xx-gpio.h +++ b/arch/arm/include/asm/hardware/iop3xx-gpio.h @@ -28,48 +28,5 @@ #include #include -#define __ARM_GPIOLIB_COMPLEX - -#define IOP3XX_N_GPIOS 8 - -static inline int gpio_get_value(unsigned gpio) -{ - if (gpio > IOP3XX_N_GPIOS) - return __gpio_get_value(gpio); - - return gpio_line_get(gpio); -} - -static inline void gpio_set_value(unsigned gpio, int value) -{ - if (gpio > IOP3XX_N_GPIOS) { - __gpio_set_value(gpio, value); - return; - } - gpio_line_set(gpio, value); -} - -static inline int gpio_cansleep(unsigned gpio) -{ - if (gpio < IOP3XX_N_GPIOS) - return 0; - else - return __gpio_cansleep(gpio); -} - -/* - * The GPIOs are not generating any interrupt - * Note : manuals are not clear about this - */ -static inline int gpio_to_irq(int gpio) -{ - return -EINVAL; -} - -static inline int irq_to_gpio(int gpio) -{ - return -EINVAL; -} - #endif diff --git a/arch/arm/include/asm/hardware/iop3xx.h b/arch/arm/include/asm/hardware/iop3xx.h index 423744b..6af9c28 100644 --- a/arch/arm/include/asm/hardware/iop3xx.h +++ b/arch/arm/include/asm/hardware/iop3xx.h @@ -25,9 +25,6 @@ #define IOP3XX_GPIO_LINE(x) (x) #ifndef __ASSEMBLY__ -extern void gpio_line_config(int line, int direction); -extern int gpio_line_get(int line); -extern void gpio_line_set(int line, int value); extern int init_atu; extern int iop3xx_get_init_atu(void); #endif diff --git a/drivers/gpio/gpio-iop.c b/drivers/gpio/gpio-iop.c index d4a170d..17cc701 100644 --- a/drivers/gpio/gpio-iop.c +++ b/drivers/gpio/gpio-iop.c @@ -19,7 +19,7 @@ #define IOP3XX_N_GPIOS 8 -void gpio_line_config(int line, int direction) +static void gpio_line_config(int line, int direction) { unsigned long flags; @@ -31,15 +31,13 @@ void gpio_line_config(int line, int direction) } local_irq_restore(flags); } -EXPORT_SYMBOL(gpio_line_config); -int gpio_line_get(int line) +static int gpio_line_get(int line) { return !!(*IOP3XX_GPID & (1 << line)); } -EXPORT_SYMBOL(gpio_line_get); -void gpio_line_set(int line, int value) +static void gpio_line_set(int line, int value) { unsigned long flags; @@ -51,7 +49,6 @@ void gpio_line_set(int line, int value) } local_irq_restore(flags); } -EXPORT_SYMBOL(gpio_line_set); static int iop3xx_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) {