linux-mips
[Top] [All Lists]

Re: [PATCH][RFT] au1000: convert to gpiolib

To: Florian Fainelli <florian@openwrt.org>
Subject: Re: [PATCH][RFT] au1000: convert to gpiolib
From: Manuel Lauss <mano@roarinelk.homelinux.net>
Date: Tue, 26 Aug 2008 14:59:47 +0200
Cc: linux-mips <linux-mips@linux-mips.org>, ralf@linux-mips.org, Kevin Hickey <khickey@rmicorp.com>
In-reply-to: <200808232349.28277.florian@openwrt.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <200808232349.28277.florian@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.16 (2007-06-09)
Hello Florian,

On Sat, Aug 23, 2008 at 11:49:27PM +0200, Florian Fainelli wrote:
> This patch converts Au1000 to use gpiolib. Testers
> welcome !
> 
> Manuel, Kevin, could you test this on your boards ? Thanks

No problems on my end.

 
> diff --git a/arch/mips/au1000/common/gpio.c b/arch/mips/au1000/common/gpio.c
> index b485d94..67b3a6b 100644
> --- a/arch/mips/au1000/common/gpio.c
> +++ b/arch/mips/au1000/common/gpio.c
> @@ -1,5 +1,5 @@
  
> -int au1xxx_gpio_direction_output(unsigned gpio, int value)
> +int __init au1000_gpio_init(void)

make that one static please.


>  {
> -     if (gpio >= AU1XXX_GPIO_BASE)
> -#if defined(CONFIG_SOC_AU1000)
> -             return -ENODEV;
> -#else
> -             return au1xxx_gpio2_direction_output(gpio, value);
> -#endif
> -
> -     return au1xxx_gpio1_direction_output(gpio, value);
> +     gpiochip_add(&au1000_gpio_chip[0].chip);
> +#if !defined(CONFIG_SOC_AU1000)
> +     gpiochip_add(&au1000_gpio_chip[1].chip);
> +#endif       
> +     return 0;
>  }
> -EXPORT_SYMBOL(au1xxx_gpio_direction_output);
> +arch_initcall(au1000_gpio_init);


Thanks,
        Manuel Lauss

<Prev in Thread] Current Thread [Next in Thread>