From: Stephen Warren <swarren@nvidia.com>
To: Grant Likely <grant.likely@secretlab.ca>,
Russell King <linux@arm.linux.org.uk>,
Colin Cross <ccross@android.com>,
Erik Gilling <konkers@android.com>,
Olof Johansson <olof@lixom.net>
Cc: linux-tegra@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Stephen Warren <swarren@nvidia.com>
Subject: [PATCH v2 3/4] arm/tegra: Delete custom gpio_to_irq, and irq_to_gpio
Date: Thu, 11 Aug 2011 14:43:23 -0600 [thread overview]
Message-ID: <1313095404-27858-3-git-send-email-swarren@nvidia.com> (raw)
In-Reply-To: <1313095404-27858-1-git-send-email-swarren@nvidia.com>
By not definining a custom gpio_to_irq, the default gpiolib version is
used, allowing platform consolidation.
irq_to_gpio is deprecated and in the process of being removed. Make that
happen now for ARM Tegra.
This also partially fixes the Tegra build; it was broken because gpio.h
referred to EINVAL, which wasn't always defined when <mach/gpio.h> was
included.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
arch/arm/mach-tegra/include/mach/gpio.h | 16 ----------------
1 files changed, 0 insertions(+), 16 deletions(-)
diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h
index e353805..284a19e 100644
--- a/arch/arm/mach-tegra/include/mach/gpio.h
+++ b/arch/arm/mach-tegra/include/mach/gpio.h
@@ -26,22 +26,6 @@
#define TEGRA_NR_GPIOS INT_GPIO_NR
#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
-#define TEGRA_IRQ_TO_GPIO(irq) ((irq) - INT_GPIO_BASE)
-
-static inline int gpio_to_irq(unsigned int gpio)
-{
- if (gpio < TEGRA_NR_GPIOS)
- return INT_GPIO_BASE + gpio;
- return -EINVAL;
-}
-#define gpio_to_irq gpio_to_irq
-
-static inline int irq_to_gpio(unsigned int irq)
-{
- if ((irq >= INT_GPIO_BASE) && (irq < INT_GPIO_BASE + INT_GPIO_NR))
- return irq - INT_GPIO_BASE;
- return -EINVAL;
-}
struct tegra_gpio_table {
int gpio; /* GPIO number */
--
1.7.0.4
next prev parent reply other threads:[~2011-08-11 20:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-11 20:43 [PATCH v2 1/4] gpio/tegra: Remove use of irq_to_gpio Stephen Warren
2011-08-11 20:43 ` [PATCH v2 2/4] gpio/tegra: Implement gpio_chip.to_irq Stephen Warren
2011-08-11 20:43 ` Stephen Warren [this message]
2011-08-11 20:43 ` [PATCH v2 4/4] arm/tegra: mach/gpio.h: include linux/types.h to fix build Stephen Warren
2011-08-11 20:54 ` [PATCH v2 1/4] gpio/tegra: Remove use of irq_to_gpio Colin Cross
2011-08-12 16:07 ` Stephen Warren
2011-08-22 23:44 ` Stephen Warren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1313095404-27858-3-git-send-email-swarren@nvidia.com \
--to=swarren@nvidia.com \
--cc=ccross@android.com \
--cc=grant.likely@secretlab.ca \
--cc=konkers@android.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=olof@lixom.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox