From patchwork Mon Feb 25 03:49:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 15048 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 4C97D23E27 for ; Mon, 25 Feb 2013 03:51:13 +0000 (UTC) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by fiordland.canonical.com (Postfix) with ESMTP id E25B2A18117 for ; Mon, 25 Feb 2013 03:51:12 +0000 (UTC) Received: by mail-vb0-f52.google.com with SMTP id fa15so1441213vbb.25 for ; Sun, 24 Feb 2013 19:51:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=IEbCpkq/iFwddTnCeL6GUCrTinO8LUHdzUx3mFNBGeY=; b=e6XEV+Ot48etaS0bJC9k2n0yCUoylR7L234ETpUJaH0M1ElISSaiERXYUogQLiD9DQ RX/Nkm7mmWj1sNZvznboffswfwEvZC46F0R07yusDSkCWBgIGC3/p+F3ESGU+jlTWRgY lJL/onjky0dxPZ1DatnR6sREvYPI6OMKfBQl9SqfXvH5gnb5h3ttmnJzAtKcberl3qsn Ba0dejgaASBNdY/TQQAdQu3Ahb55f1IYB8CONEDM2crKfslyFSIAHtB/TT7mZC+LTjhQ Y481FXkBG45mHqqqfqV+R2Ey4z6FF8P9Q7VQDooh9roR3HVT+v0jkPfbBN2Ny+h6U4GT GV+g== X-Received: by 10.220.214.6 with SMTP id gy6mr9148766vcb.8.1361764272343; Sun, 24 Feb 2013 19:51:12 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp39544veb; Sun, 24 Feb 2013 19:51:11 -0800 (PST) X-Received: by 10.66.4.193 with SMTP id m1mr16434267pam.214.1361764271515; Sun, 24 Feb 2013 19:51:11 -0800 (PST) Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by mx.google.com with ESMTPS id ib1si10389092pbc.283.2013.02.24.19.51.11 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 24 Feb 2013 19:51:11 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.42 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=209.85.220.42; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.42 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) smtp.mail=haojian.zhuang@linaro.org Received: by mail-pa0-f42.google.com with SMTP id kq12so1491325pab.29 for ; Sun, 24 Feb 2013 19:51:11 -0800 (PST) X-Received: by 10.66.217.194 with SMTP id pa2mr16478604pac.108.1361764271084; Sun, 24 Feb 2013 19:51:11 -0800 (PST) Received: from localhost.localdomain ([67.198.145.34]) by mx.google.com with ESMTPS id b9sm11188695pba.6.2013.02.24.19.51.06 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 24 Feb 2013 19:51:10 -0800 (PST) From: Haojian Zhuang To: grinberg@compulab.co.il, linus.walleij@linaro.org, linux@arm.linux.org.uk, marek.vasut@gmail.com, robert.jarzmik@free.fr, daniel@caiaq.de, linux-arm-kernel@lists.infradead.org, grant.likely@secretlab.ca, cxie4@marvell.com Cc: patches@linaro.org, Haojian Zhuang Subject: [PATCH v5 03/12] gpio: pxa: rename function name Date: Mon, 25 Feb 2013 11:49:32 +0800 Message-Id: <1361764181-26647-4-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1361764181-26647-1-git-send-email-haojian.zhuang@linaro.org> References: <1361764181-26647-1-git-send-email-haojian.zhuang@linaro.org> X-Gm-Message-State: ALoCoQkq0hs6RLb+P7RB+DV9qB7LQEehOjF3EkxnwJ6CoVZHHGmtvg+GrrFxw9Go9a0aGr4iRaHv Rename __gpio_is_occupied() & __gpio_is_inverted() to pxa_gpio_is_occupied() & pxa_gpio_is_inverted(). Signed-off-by: Haojian Zhuang --- drivers/gpio/gpio-pxa.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index ad54392..9519ab9 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -126,7 +126,7 @@ static inline int gpio_is_mmp_type(int type) /* GPIO86/87/88/89 on PXA26x have their direction bits in PXA_GPDR(2 inverted, * as well as their Alternate Function value being '1' for GPIO in GAFRx. */ -static inline int __gpio_is_inverted(int gpio) +static inline int pxa_gpio_is_inverted(int gpio) { if ((gpio_type == PXA26X_GPIO) && (gpio > 85)) return 1; @@ -139,7 +139,7 @@ static inline int __gpio_is_inverted(int gpio) * is attributed as "occupied" here (I know this terminology isn't * accurate, you are welcome to propose a better one :-) */ -static inline int __gpio_is_occupied(unsigned gpio) +static inline int pxa_gpio_is_occupied(unsigned gpio) { struct pxa_gpio_chip *chip; void __iomem *base; @@ -158,7 +158,7 @@ static inline int __gpio_is_occupied(unsigned gpio) af = (gafr >> ((gpio & 0xf) * 2)) & 0x3; dir = gpdr & GPIO_bit(gpio); - if (__gpio_is_inverted(gpio)) + if (pxa_gpio_is_inverted(gpio)) ret = (af != 1) || (dir == 0); else ret = (af != 0) || (dir != 0); @@ -189,7 +189,7 @@ static int pxa_gpio_direction_input(struct gpio_chip *gc, unsigned offset) spin_lock_irqsave(&gpio_lock, flags); value = readl_relaxed(base + GPDR_OFFSET); - if (__gpio_is_inverted(gc->base + offset)) + if (pxa_gpio_is_inverted(gc->base + offset)) value |= mask; else value &= ~mask; @@ -211,7 +211,7 @@ static int pxa_gpio_direction_output(struct gpio_chip *gc, spin_lock_irqsave(&gpio_lock, flags); tmp = readl_relaxed(base + GPDR_OFFSET); - if (__gpio_is_inverted(gc->base + offset)) + if (pxa_gpio_is_inverted(gc->base + offset)) tmp &= ~mask; else tmp |= mask; @@ -322,7 +322,7 @@ static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type) if ((c->irq_edge_rise | c->irq_edge_fall) & GPIO_bit(gpio)) return 0; - if (__gpio_is_occupied(gpio)) + if (pxa_gpio_is_occupied(gpio)) return 0; type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING; @@ -330,7 +330,7 @@ static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type) gpdr = readl_relaxed(c->regbase + GPDR_OFFSET); - if (__gpio_is_inverted(gpio)) + if (pxa_gpio_is_inverted(gpio)) writel_relaxed(gpdr | mask, c->regbase + GPDR_OFFSET); else writel_relaxed(gpdr & ~mask, c->regbase + GPDR_OFFSET);