From: nicolas.ferre@atmel.com (Nicolas Ferre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 08/16] ARM: at91: Switch over to gpiolib ->to_irq() and __gpio_to_irq().
Date: Fri, 17 Dec 2010 10:55:35 +0100 [thread overview]
Message-ID: <4D0B3397.7000002@atmel.com> (raw)
In-Reply-To: <20101215020338.GA15575@mail.wantstofly.org>
Le 15/12/2010 03:03, Lennert Buytenhek :
> Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> arch/arm/mach-at91/gpio.c | 7 +++++++
> arch/arm/mach-at91/include/mach/gpio.h | 6 +-----
> 2 files changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c
> index ae4772e..efcfe8b 100644
> --- a/arch/arm/mach-at91/gpio.c
> +++ b/arch/arm/mach-at91/gpio.c
> @@ -44,6 +44,7 @@ static int at91_gpiolib_direction_output(struct gpio_chip *chip,
> unsigned offset, int val);
> static int at91_gpiolib_direction_input(struct gpio_chip *chip,
> unsigned offset);
> +static int at91_gpiolib_to_irq(struct gpio_chip *chip, unsigned offset);
>
> #define AT91_GPIO_CHIP(name, base_gpio, nr_gpio) \
> { \
> @@ -53,6 +54,7 @@ static int at91_gpiolib_direction_input(struct gpio_chip *chip,
> .direction_output = at91_gpiolib_direction_output, \
> .get = at91_gpiolib_get, \
> .set = at91_gpiolib_set, \
> + .to_irq = at91_gpiolib_to_irq, \
> .dbg_show = at91_gpiolib_dbg_show, \
> .base = base_gpio, \
> .ngpio = nr_gpio, \
> @@ -586,6 +588,11 @@ static void at91_gpiolib_set(struct gpio_chip *chip, unsigned offset, int val)
> __raw_writel(mask, pio + (val ? PIO_SODR : PIO_CODR));
> }
>
> +static int at91_gpiolib_to_irq(struct gpio_chip *chip, unsigned offset)
> +{
> + return chip->base + offset;
> +}
> +
> static void at91_gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip)
> {
> int i;
> diff --git a/arch/arm/mach-at91/include/mach/gpio.h b/arch/arm/mach-at91/include/mach/gpio.h
> index bfdd8ab..1e557f4 100644
> --- a/arch/arm/mach-at91/include/mach/gpio.h
> +++ b/arch/arm/mach-at91/include/mach/gpio.h
> @@ -219,11 +219,7 @@ extern void at91_gpio_resume(void);
> #define gpio_get_value __gpio_get_value
> #define gpio_set_value __gpio_set_value
> #define gpio_cansleep __gpio_cansleep
> -
> -static inline int gpio_to_irq(unsigned gpio)
> -{
> - return gpio;
> -}
> +#define gpio_to_irq __gpio_to_irq
>
> static inline int irq_to_gpio(unsigned irq)
> {
--
Nicolas Ferre
next prev parent reply other threads:[~2010-12-17 9:55 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1292377339.git.buytenh@wantstofly.org>
2010-12-15 2:02 ` [PATCH 01/16] ARM: Remove dependency of plat-orion time code on mach directory includes Lennert Buytenhek
2010-12-15 2:44 ` Nicolas Pitre
2010-12-15 9:16 ` Lennert Buytenhek
2010-12-15 15:37 ` Nicolas Pitre
2010-12-15 16:25 ` Russell King - ARM Linux
2010-12-15 16:59 ` Nicolas Pitre
2010-12-15 2:02 ` [PATCH 02/16] ARM: Remove dependency of plat-orion GPIO " Lennert Buytenhek
2010-12-15 8:08 ` Saeed Bishara
2010-12-15 9:10 ` Lennert Buytenhek
2010-12-15 15:34 ` Nicolas Pitre
2010-12-15 2:03 ` [PATCH 03/16] ARM: Remove some spurious mach dir includes Lennert Buytenhek
2010-12-15 2:03 ` [PATCH 04/16] ARM: Dove: Remove PXA compatibility IRQ defines Lennert Buytenhek
2010-12-15 8:10 ` Saeed Bishara
2010-12-15 13:13 ` Sergei Shtylyov
2010-12-15 2:03 ` [PATCH 05/16] ARM: Always reassign PCI bus numbers Lennert Buytenhek
2010-12-15 2:03 ` [PATCH 06/16] ARM: iop13xx: Make PCIBIOS_MIN_* constants Lennert Buytenhek
2010-12-15 2:03 ` [PATCH 07/16] ARM: Make PCIBIOS_* into global variables Lennert Buytenhek
2010-12-16 6:51 ` Mike Rapoport
2010-12-15 2:03 ` [PATCH 08/16] ARM: at91: Switch over to gpiolib ->to_irq() and __gpio_to_irq() Lennert Buytenhek
2010-12-17 9:55 ` Nicolas Ferre [this message]
2010-12-17 13:00 ` Jean-Christophe PLAGNIOL-VILLARD
2010-12-15 2:03 ` [PATCH 09/16] ARM: ep93xx: " Lennert Buytenhek
2010-12-15 2:03 ` [PATCH 10/16] ARM: gemini: " Lennert Buytenhek
2010-12-17 12:03 ` Hans Ulli Kroll
2010-12-15 2:03 ` [PATCH 11/16] ARM: mxc: " Lennert Buytenhek
2010-12-15 14:22 ` Sascha Hauer
2010-12-16 9:00 ` Shawn Guo
2010-12-16 9:58 ` Uwe Kleine-König
2010-12-15 2:03 ` [PATCH 12/16] ARM: pxa: Provide gpiolib ->to_irq() implementation Lennert Buytenhek
2010-12-15 2:03 ` [PATCH 13/16] ARM: mmp: Switch over to gpiolib's version of __gpio_to_irq() Lennert Buytenhek
2010-12-15 2:03 ` [PATCH 14/16] ARM: pxa: " Lennert Buytenhek
2010-12-15 2:03 ` [PATCH 15/16] ARM: sa1100: Switch over to gpiolib ->to_irq() and __gpio_to_irq() Lennert Buytenhek
2010-12-15 2:04 ` [PATCH 16/16] ARM: w90x900: " Lennert Buytenhek
2010-12-15 2:08 ` Wan ZongShun
2010-12-15 2:09 ` Wan ZongShun
2010-12-15 2:18 ` Wan ZongShun
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=4D0B3397.7000002@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.