From patchwork Mon Sep 9 15:40:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 19841 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f197.google.com (mail-ye0-f197.google.com [209.85.213.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 123B225A57 for ; Mon, 9 Sep 2013 15:40:57 +0000 (UTC) Received: by mail-ye0-f197.google.com with SMTP id q5sf6989753yen.0 for ; Mon, 09 Sep 2013 08:40:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state: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=5dUU++XIlP1xBxJgP4fxvGZUGxJ+B6LUn8gTMRuRYA8=; b=l6a9FQ6XCq19RIEdQgikGaUALX1TtTVPzAlc6eNfgUHFStOyEZKr9ioRS4yfYDcr8o Yo08xyr9PgC6G0eqdAf/VSm75dHABMZxA4gizfYg8ywE5zaTA0ydoCSe3FXixMSB8v4u kcuFrNhmHXS+Ms9FrU4iUUWQ+mBDR+8bsVCOdCBu+7XghOXSHl5VtCVvHOfAlWPQdRmk GQwVPkRos6/02knxper3AxoH2ICgpjEWtBD7RuxXB8zurXoOXrirqYjzxR5b/EvKQO12 gunt3gdHBT8W9c9YTTVZmRJOOjc5Zc3gkvAANjHKMzo16lqQA1iU+WOPN4Fc4NGJrQDE i0HQ== X-Received: by 10.236.53.70 with SMTP id f46mr6522267yhc.17.1378741256873; Mon, 09 Sep 2013 08:40:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.116.135 with SMTP id jw7ls1753377qeb.58.gmail; Mon, 09 Sep 2013 08:40:56 -0700 (PDT) X-Received: by 10.52.119.228 with SMTP id kx4mr15205003vdb.12.1378741256783; Mon, 09 Sep 2013 08:40:56 -0700 (PDT) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id tf3si3300706vec.30.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Sep 2013 08:40:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.169 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.169; Received: by mail-ve0-f169.google.com with SMTP id db12so3745923veb.0 for ; Mon, 09 Sep 2013 08:40:56 -0700 (PDT) X-Gm-Message-State: ALoCoQmHsRK/ye+R3NnotlxHU46im7XVwkEhXP9OLi0E1dGxeKM0OkZCHYf3MRYtS9SyYBGeB3v7 X-Received: by 10.52.64.143 with SMTP id o15mr1931826vds.16.1378741256699; Mon, 09 Sep 2013 08:40:56 -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 u4csp94151vcz; Mon, 9 Sep 2013 08:40:56 -0700 (PDT) X-Received: by 10.112.143.3 with SMTP id sa3mr16762192lbb.12.1378741255620; Mon, 09 Sep 2013 08:40:55 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com [209.85.217.170]) by mx.google.com with ESMTPS id pw1si5860687lbb.76.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Sep 2013 08:40:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.217.170 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.217.170; Received: by mail-lb0-f170.google.com with SMTP id w7so5280253lbi.1 for ; Mon, 09 Sep 2013 08:40:55 -0700 (PDT) X-Received: by 10.152.45.106 with SMTP id l10mr17250148lam.12.1378741254989; Mon, 09 Sep 2013 08:40:54 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id k6sm6681416lae.9.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 09 Sep 2013 08:40:54 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org, Lennert Buytenhek , Dan Williams , Mikael Pettersson Cc: Alexandre Courbot , linux-arm-kernel@lists.infradead.org, Linus Walleij Subject: [PATCH 5/8] ARM: plat-iop: remove custom complex GPIO implementation Date: Mon, 9 Sep 2013 17:40:51 +0200 Message-Id: <1378741251-13032-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.169 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: 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) {