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: 2180021 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id C3DAF3FCA4 for ; Mon, 25 Feb 2013 03:54:53 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U9p6P-0003Mo-Bi; Mon, 25 Feb 2013 03:51:45 +0000 Received: from mail-pa0-f46.google.com ([209.85.220.46]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U9p5s-0003GK-D4 for linux-arm-kernel@lists.infradead.org; Mon, 25 Feb 2013 03:51:13 +0000 Received: by mail-pa0-f46.google.com with SMTP id kp14so1497647pab.19 for ; Sun, 24 Feb 2013 19:51:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=IEbCpkq/iFwddTnCeL6GUCrTinO8LUHdzUx3mFNBGeY=; b=pF5fW/3LiCBcNtcy2WKo4V0kXbvRqlCxGXwIoZE93ob4mBYihZtIKh/UXtjvpC+i5b 6x7wFKR3syOWcU94MrzKQUi0VaVysW+dR+C3wdbqgZtmZH7VhwtoQkZGzT2twnPuvLlJ jHJulIbbUQZDB09xk8MPqvjX2kZy+UgxCyqe2bmkuCCsqE1QlZUa4NBFldrifrbsg1H6 2Zop8v38kqW+lGFB0LYFO6wrKW2WqAcmD+eXRlROZzmchY5GHURzEen7PYPT14GRUSEF X4f62d11F6qRGrFJdjiZFOfKgdFSyYJ0K3f69s88/1GHYyHN5RQF0XbdCr11r4aru13a hxQQ== 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 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: ALoCoQmfs2W4wCaAIExXdb2BCcLNkusX80Jygg/aW3hGEem6HwPOuuSsMrGEovkAEuKZk+qcCYX4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130224_225112_624478_5A45E6F8 X-CRM114-Status: GOOD ( 12.83 ) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.46 listed in list.dnswl.org] 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Haojian Zhuang , patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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);