From: nicolas.ferre@atmel•com (Nicolas Ferre)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 1/4] ARM: at91: gpio: implement request
Date: Tue, 7 Aug 2012 14:34:54 +0200 [thread overview]
Message-ID: <50210B6E.70402@atmel.com> (raw)
In-Reply-To: <1342359637-15325-1-git-send-email-plagnioj@jcrosoft.com>
On 07/15/2012 03:40 PM, Jean-Christophe PLAGNIOL-VILLARD :
> confire the pin as pio when requested
>
> Cc: Nicolas Ferre <nicolas.ferre@atmel•com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel•com>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft•com>
> ---
> arch/arm/mach-at91/gpio.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c
> index 325837a..994ed02 100644
> --- a/arch/arm/mach-at91/gpio.c
> +++ b/arch/arm/mach-at91/gpio.c
> @@ -44,6 +44,7 @@ struct at91_gpio_chip {
>
> #define to_at91_gpio_chip(c) container_of(c, struct at91_gpio_chip, chip)
>
> +static int at91_gpiolib_request(struct gpio_chip *chip, unsigned offset);
> static void at91_gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip);
> static void at91_gpiolib_set(struct gpio_chip *chip, unsigned offset, int val);
> static int at91_gpiolib_get(struct gpio_chip *chip, unsigned offset);
> @@ -57,6 +58,7 @@ static int at91_gpiolib_to_irq(struct gpio_chip *chip, unsigned offset);
> { \
> .chip = { \
> .label = name, \
> + .request = at91_gpiolib_request, \
> .direction_input = at91_gpiolib_direction_input, \
> .direction_output = at91_gpiolib_direction_output, \
> .get = at91_gpiolib_get, \
> @@ -861,6 +863,18 @@ void __init at91_gpio_irq_setup(void)
> }
>
> /* gpiolib support */
> +
> +
> +static int at91_gpiolib_request(struct gpio_chip *chip, unsigned offset)
> +{
> + struct at91_gpio_chip *at91_gpio = to_at91_gpio_chip(chip);
> + void __iomem *pio = at91_gpio->regbase;
> + unsigned mask = 1 << offset;
> +
> + __raw_writel(mask, pio + PIO_PER);
> + return 0;
> +}
> +
> static int at91_gpiolib_direction_input(struct gpio_chip *chip,
> unsigned offset)
> {
>
--
Nicolas Ferre
next prev parent reply other threads:[~2012-08-07 12:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-15 13:16 [PULL] [PATCH 0/4] arm: at91: gpio fix Jean-Christophe PLAGNIOL-VILLARD
2012-07-15 13:40 ` [PATCH 1/4] ARM: at91: gpio: implement request Jean-Christophe PLAGNIOL-VILLARD
2012-07-15 13:40 ` [PATCH 2/4] ARM: at91: gpio: implement gpio_free Jean-Christophe PLAGNIOL-VILLARD
2012-08-07 12:47 ` Nicolas Ferre
2012-07-15 13:40 ` [PATCH 3/4] at91: regroup gpio and pinctrl under a simple-bus Jean-Christophe PLAGNIOL-VILLARD
2012-08-07 12:50 ` Nicolas Ferre
2012-07-15 13:40 ` [PATCH 4/4] arm: at91: at91sam9x5: fix gpio number per bank Jean-Christophe PLAGNIOL-VILLARD
2012-07-18 15:38 ` Olof Johansson
2012-08-07 12:52 ` Nicolas Ferre
2012-08-07 12:34 ` Nicolas Ferre [this message]
2012-07-18 3:54 ` [PULL] [PATCH 0/4] arm: at91: gpio fix Olof Johansson
2012-07-18 5:23 ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-18 5:41 ` Olof Johansson
2012-07-18 10:57 ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-18 15:40 ` Olof Johansson
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=50210B6E.70402@atmel.com \
--to=nicolas.ferre@atmel$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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