diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-05-08 12:24:30 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-05-08 12:24:30 +0000 |
commit | 11c588bc9614acef0537ec430be40af25c4ed9d5 (patch) | |
tree | c25c1e35c813bf8eba2de331c956fba475ac97f5 /target/linux/ar71xx/files/arch | |
parent | d4600d867cee7e99ae82855b9feaf0ea46fc1a38 (diff) | |
download | upstream-11c588bc9614acef0537ec430be40af25c4ed9d5.tar.gz upstream-11c588bc9614acef0537ec430be40af25c4ed9d5.tar.bz2 upstream-11c588bc9614acef0537ec430be40af25c4ed9d5.zip |
ar71xx: do general formatting on wnr2000-v4
Signed-off-by: Michael J. Bazzinotti <mbazzinotti@gmail.com>
SVN-Revision: 45640
Diffstat (limited to 'target/linux/ar71xx/files/arch')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v4.c | 95 |
1 files changed, 52 insertions, 43 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v4.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v4.c index 6ba1500052..c5159a30ca 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v4.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v4.c @@ -30,54 +30,52 @@ #include "machtypes.h" /* AR9341 GPIOs */ -#define WNR2000V4_GPIO_LED_WAN_AMBER 22 -#define WNR2000V4_GPIO_LED_WAN_GREEN 17 -#define WNR2000V4_GPIO_LED_WPS 2 -#define WNR2000V4_GPIO_LED_WLAN 12 -#define WNR2000V4_GPIO_LED_LAN1_GREEN 13 -#define WNR2000V4_GPIO_LED_LAN2_GREEN 14 -#define WNR2000V4_GPIO_LED_LAN3_GREEN 15 -#define WNR2000V4_GPIO_LED_LAN4_GREEN 16 -#define WNR2000V4_GPIO_LED_LAN1_AMBER 18 -#define WNR2000V4_GPIO_LED_LAN2_AMBER 19 -#define WNR2000V4_GPIO_LED_LAN3_AMBER 20 -#define WNR2000V4_GPIO_LED_LAN4_AMBER 21 -#define STATUS_LED_GPIO 1 -#define WNR2000V4_GPIO_LED_PWR_GREEN 0 - -#define WNR2000V4_GPIO_BTN_WPS 3 -#define WNR2000V4_GPIO_BTN_RESET 4 -#define WNR2000V4_GPIO_BTN_WLAN 11 - -#define WNR2000V4_KEYS_POLL_INTERVAL 20 /* msecs */ -#define WNR2000V4_KEYS_DEBOUNCE_INTERVAL (3 * WNR2000V4_KEYS_POLL_INTERVAL) - -#define WNR2000V4_MAC0_OFFSET 0 -#define WNR2000V4_MAC1_OFFSET 6 +#define WNR2000V4_GPIO_LED_PWR_GREEN 0 +#define WNR2000V4_GPIO_LED_PWR_AMBER 1 +#define WNR2000V4_GPIO_LED_WPS 2 +#define WNR2000V4_GPIO_LED_WLAN 12 +#define WNR2000V4_GPIO_LED_LAN1_GREEN 13 +#define WNR2000V4_GPIO_LED_LAN2_GREEN 14 +#define WNR2000V4_GPIO_LED_LAN3_GREEN 15 +#define WNR2000V4_GPIO_LED_LAN4_GREEN 16 +#define WNR2000V4_GPIO_LED_LAN1_AMBER 18 +#define WNR2000V4_GPIO_LED_LAN2_AMBER 19 +#define WNR2000V4_GPIO_LED_LAN3_AMBER 20 +#define WNR2000V4_GPIO_LED_LAN4_AMBER 21 +#define WNR2000V4_GPIO_LED_WAN_GREEN 17 +#define WNR2000V4_GPIO_LED_WAN_AMBER 22 +/* Buttons */ +#define WNR2000V4_GPIO_BTN_WPS 3 +#define WNR2000V4_GPIO_BTN_RESET 4 +#define WNR2000V4_GPIO_BTN_WLAN 11 +#define WNR2000V4_KEYS_POLL_INTERVAL 20 /* msecs */ +#define WNR2000V4_KEYS_DEBOUNCE_INTERVAL (3 * WNR2000V4_KEYS_POLL_INTERVAL) + + +/* ART offsets */ +#define WNR2000V4_MAC0_OFFSET 0 /* WAN/WLAN0 MAC */ +#define WNR2000V4_MAC1_OFFSET 6 /* Eth-switch0 MAC */ static struct gpio_led wnr2000v4_leds_gpio[] __initdata = { { .name = "netgear:green:power", .gpio = WNR2000V4_GPIO_LED_PWR_GREEN, .active_low = 1, - .default_trigger = "default-on", - }, { - .name = "netgear:green:wan", - .gpio = WNR2000V4_GPIO_LED_WAN_GREEN, - .active_low = 1, - }, { - .name = "netgear:amber:wan", - .gpio = WNR2000V4_GPIO_LED_WAN_AMBER, + .default_trigger = "default-on", + }, + { + .name = "netgear:amber:status", + .gpio = WNR2000V4_GPIO_LED_PWR_AMBER, .active_low = 1, }, { - .name = "netgear:green:wps", - .gpio = WNR2000V4_GPIO_LED_WPS, + .name = "netgear:green:wan", + .gpio = WNR2000V4_GPIO_LED_WAN_GREEN, .active_low = 1, }, { - .name = "netgear:amber:status", - .gpio = STATUS_LED_GPIO, + .name = "netgear:amber:wan", + .gpio = WNR2000V4_GPIO_LED_WAN_AMBER, .active_low = 1, }, { @@ -90,15 +88,18 @@ static struct gpio_led wnr2000v4_leds_gpio[] __initdata = { .name = "netgear:green:lan1", .gpio = WNR2000V4_GPIO_LED_LAN1_GREEN, .active_low = 1, - }, { + }, + { .name = "netgear:green:lan2", .gpio = WNR2000V4_GPIO_LED_LAN2_GREEN, .active_low = 1, - }, { + }, + { .name = "netgear:green:lan3", .gpio = WNR2000V4_GPIO_LED_LAN3_GREEN, .active_low = 1, - }, { + }, + { .name = "netgear:green:lan4", .gpio = WNR2000V4_GPIO_LED_LAN4_GREEN, .active_low = 1, @@ -107,19 +108,27 @@ static struct gpio_led wnr2000v4_leds_gpio[] __initdata = { .name = "netgear:amber:lan1", .gpio = WNR2000V4_GPIO_LED_LAN1_AMBER, .active_low = 1, - }, { + }, + { .name = "netgear:amber:lan2", .gpio = WNR2000V4_GPIO_LED_LAN2_AMBER, .active_low = 1, - }, { + }, + { .name = "netgear:amber:lan3", .gpio = WNR2000V4_GPIO_LED_LAN3_AMBER, .active_low = 1, - }, { + }, + { .name = "netgear:amber:lan4", .gpio = WNR2000V4_GPIO_LED_LAN4_AMBER, .active_low = 1, - } + }, + { + .name = "netgear:green:wps", + .gpio = WNR2000V4_GPIO_LED_WPS, + .active_low = 1, + }, }; static struct gpio_keys_button wnr2000v4_gpio_keys[] __initdata = { |