From patchwork Wed Jan 22 00:10:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Mayer X-Patchwork-Id: 23473 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F24AE203BE for ; Wed, 22 Jan 2014 00:11:45 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id x13sf35364942ief.2 for ; Tue, 21 Jan 2014 16:11:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe:content-type; bh=PLHLdpoud9JaW2JuYdn8SZTsK4BVlKk8PcnFfyE0Zi8=; b=EB4HL9SNCmYrnRrV0g36d5orp0cn2rQZ+gSqr8Lu9DOIiTyfUesT3DIsozvAAQ3lxF fZP+Hui7zGkTDxWM+4d83wZQp9BmpqABy5DIHaQUgDPDjN0d7tWRH1aP+M+AsW5WTD4q dJe8/wBliCbCmQc75GEA8WtCbBCVugXCwgD+nv+E/LikoPnW2wwcGTvM2+TrKKw5pn5/ 2bCqb7lC7w9XbAWbXLxDacrBJsnEZvNd4TMflmVTERNfTnWCsqycCy2aX0D8/R//MKU7 vX9fH4gKfzwTGsmhWvmEj9BHnbROnKIg9uoftl2Pa8RidfDkI6Xx57AheIi0NYQYWoNp 0U6w== X-Gm-Message-State: ALoCoQnnlPydPNhrFIbSCy/gFG3nDDxLF/F4W+FzUchS0e6r7jsQIyacIFxz5CNrWFtNXqKWbliA X-Received: by 10.182.104.70 with SMTP id gc6mr9761961obb.35.1390349505238; Tue, 21 Jan 2014 16:11:45 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.107.199 with SMTP id h65ls1373750qgf.76.gmail; Tue, 21 Jan 2014 16:11:45 -0800 (PST) X-Received: by 10.58.235.129 with SMTP id um1mr16628501vec.17.1390349505111; Tue, 21 Jan 2014 16:11:45 -0800 (PST) Received: from mail-vb0-f42.google.com (mail-vb0-f42.google.com [209.85.212.42]) by mx.google.com with ESMTPS id c2si3177498vct.142.2014.01.21.16.11.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Jan 2014 16:11:45 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.42 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.42; Received: by mail-vb0-f42.google.com with SMTP id i3so3608586vbh.1 for ; Tue, 21 Jan 2014 16:11:45 -0800 (PST) X-Received: by 10.58.116.239 with SMTP id jz15mr3505935veb.26.1390349504991; Tue, 21 Jan 2014 16:11:44 -0800 (PST) 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 u4csp149316vcz; Tue, 21 Jan 2014 16:11:44 -0800 (PST) X-Received: by 10.50.222.99 with SMTP id ql3mr273158igc.42.1390349504412; Tue, 21 Jan 2014 16:11:44 -0800 (PST) Received: from mail-gw2-out.broadcom.com (mail-gw2-out.broadcom.com. [216.31.210.63]) by mx.google.com with ESMTP id j3si4485562igx.66.2014.01.21.16.11.43 for ; Tue, 21 Jan 2014 16:11:44 -0800 (PST) Received-SPF: neutral (google.com: 216.31.210.63 is neither permitted nor denied by best guess record for domain of markus.mayer@linaro.org) client-ip=216.31.210.63; X-IronPort-AV: E=Sophos;i="4.95,697,1384329600"; d="scan'208";a="10560812" Received: from irvexchcas08.broadcom.com (HELO IRVEXCHCAS08.corp.ad.broadcom.com) ([10.9.208.57]) by mail-gw2-out.broadcom.com with ESMTP; 21 Jan 2014 16:22:51 -0800 Received: from IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.1.438.0; Tue, 21 Jan 2014 16:11:42 -0800 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) with Microsoft SMTP Server id 14.1.438.0; Tue, 21 Jan 2014 16:11:41 -0800 Received: from mail.broadcom.com (lbrmn-lnxub70.ric.broadcom.com [10.136.8.215]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id D4118248C8; Tue, 21 Jan 2014 16:10:04 -0800 (PST) From: Markus Mayer To: Linus Walleij CC: Linaro Patches , Linux GPIO List , Linux Kernel Mailing List , Tim Kryger , Markus Mayer Subject: [PATCH] gpio: bcm281xx: Fix parameter name for GPIO_CONTROL macro Date: Tue, 21 Jan 2014 16:10:04 -0800 Message-ID: <1390349404-23326-1-git-send-email-markus.mayer@linaro.org> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: markus.mayer@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.42 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 GPIO_CONTROL macro returns the control register offset when given a GPIO number. Update the argument name in the macro to reflect that it takes in a GPIO number and not a bank. Signed-off-by: Markus Mayer Reviewed-by: Tim Kryger --- drivers/gpio/gpio-bcm-kona.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c index 233d088..93a5b01 100644 --- a/drivers/gpio/gpio-bcm-kona.c +++ b/drivers/gpio/gpio-bcm-kona.c @@ -28,6 +28,10 @@ #define GPIO_BANK(gpio) ((gpio) >> 5) #define GPIO_BIT(gpio) ((gpio) & (GPIO_PER_BANK - 1)) +/* There is a GPIO control register for each GPIO */ +#define GPIO_CONTROL(gpio) (0x00000100 + ((gpio) << 2)) + +/* The remaining registers are per GPIO bank */ #define GPIO_OUT_STATUS(bank) (0x00000000 + ((bank) << 2)) #define GPIO_IN_STATUS(bank) (0x00000020 + ((bank) << 2)) #define GPIO_OUT_SET(bank) (0x00000040 + ((bank) << 2)) @@ -35,7 +39,6 @@ #define GPIO_INT_STATUS(bank) (0x00000080 + ((bank) << 2)) #define GPIO_INT_MASK(bank) (0x000000a0 + ((bank) << 2)) #define GPIO_INT_MSKCLR(bank) (0x000000c0 + ((bank) << 2)) -#define GPIO_CONTROL(bank) (0x00000100 + ((bank) << 2)) #define GPIO_PWD_STATUS(bank) (0x00000500 + ((bank) << 2)) #define GPIO_GPPWR_OFFSET 0x00000520