1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

[ar71xx] make all AR913x GPIO lines usable

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13509 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
juhosg
2008-12-04 12:17:14 +00:00
parent 59266b3466
commit b80c50f7cf
3 changed files with 23 additions and 2 deletions

View File

@@ -22,6 +22,9 @@
static DEFINE_SPINLOCK(ar71xx_gpio_lock);
unsigned long ar71xx_gpio_count;
EXPORT_SYMBOL(ar71xx_gpio_count);
void __ar71xx_gpio_set_value(unsigned gpio, int value)
{
unsigned long flags;
@@ -129,6 +132,22 @@ void __init ar71xx_gpio_init(void)
"AR71xx GPIO controller"))
panic("cannot allocate AR71xx GPIO registers page");
switch (ar71xx_soc) {
case AR71XX_SOC_AR7130:
case AR71XX_SOC_AR7141:
case AR71XX_SOC_AR7161:
ar71xx_gpio_chip.ngpio = AR71XX_GPIO_COUNT;
break;
case AR71XX_SOC_AR9130:
case AR71XX_SOC_AR9132:
ar71xx_gpio_chip.ngpio = AR91XX_GPIO_COUNT;
break;
default:
BUG();
}
err = gpiochip_add(&ar71xx_gpio_chip);
if (err)
panic("cannot add AR71xx GPIO chip, error=%d", err);