add support for titan variant (WRTP54G) (#6185)
[openwrt/openwrt.git] / target / linux / ar7 / files / arch / mips / ar7 / gpio.c
index 207d270934f362702b6e67fade9061ce5902d451..56860f46d5ee422b4c4cf6c3fddc59db71128498 100644 (file)
 
 #include <asm/ar7/gpio.h>
 
-static const char *ar7_gpio_list[AR7_GPIO_MAX];
+static const char *ar7_gpio_list[TITAN_GPIO_MAX];
 
 int gpio_request(unsigned gpio, const char *label)
 {
-       if (gpio >= AR7_GPIO_MAX)
+       if (gpio >= (ar7_is_titan() ? TITAN_GPIO_MAX : AR7_GPIO_MAX))
                return -EINVAL;
 
        if (ar7_gpio_list[gpio])