diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-08-07 16:19:41 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-08-07 16:19:41 +0000 |
commit | 20deea5f7c4cfd0b82451c08a1c2d53860bde3e8 (patch) | |
tree | 6f231848816f9bbac8a0ab051cbfbe1e4fc6add7 /target/linux/adm5120-2.6 | |
parent | c0a6927a77462a30773ecbc63066b16d43a01cb8 (diff) |
[adm5120] LED driver fixes
* add LED definitions for the BR-6104K boards from #2153
* sort board definitions alphabetically
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8377 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/adm5120-2.6')
-rw-r--r-- | target/linux/adm5120-2.6/files/drivers/leds/leds-adm5120.c | 138 |
1 files changed, 82 insertions, 56 deletions
diff --git a/target/linux/adm5120-2.6/files/drivers/leds/leds-adm5120.c b/target/linux/adm5120-2.6/files/drivers/leds/leds-adm5120.c index 4f4be3506c..b5d47b7078 100644 --- a/target/linux/adm5120-2.6/files/drivers/leds/leds-adm5120.c +++ b/target/linux/adm5120-2.6/files/drivers/leds/leds-adm5120.c @@ -71,61 +71,6 @@ n ## _leds [] __initdata = #define LED_INV(g,n,t) LED_DATA((n),(t),(g), 1, 0) /* - * ZyXEL boards - */ -#if defined(CONFIG_LEDS_ADM5120_EXPERIMENTAL) -LED_ARRAY(p334) { /* FIXME: untested */ - LED_INV(ADM5120_GPIO_xxxx, "power", NULL ), - LED_INV(ADM5120_GPIO_xxxx, "lan1", NULL ), - LED_INV(ADM5120_GPIO_xxxx, "lan2", NULL ), - LED_INV(ADM5120_GPIO_xxxx, "lan3", NULL ), - LED_INV(ADM5120_GPIO_xxxx, "lan4", NULL ), - LED_INV(ADM5120_GPIO_xxxx, "wan", NULL ), -}; -#endif - -LED_ARRAY(p334wt) { - LED_INV(ADM5120_GPIO_PIN2, "power", NULL ), - LED_INV(ADM5120_GPIO_P3L0, "lan1", NULL ), - LED_INV(ADM5120_GPIO_P2L0, "lan2", NULL ), - LED_INV(ADM5120_GPIO_P1L0, "lan3", NULL ), - LED_INV(ADM5120_GPIO_P0L0, "lan4", NULL ), - LED_INV(ADM5120_GPIO_P4L0, "wan", NULL ), - LED_INV(ADM5120_GPIO_P4L2, "wlan", NULL ), - LED_INV(ADM5120_GPIO_P2L2, "otist", NULL ), - LED_INV(ADM5120_GPIO_P1L2, "hidden", NULL ), -}; - -#if defined(CONFIG_LEDS_ADM5120_EXPERIMENTAL) -LED_ARRAY(p335) { /* FIXME: untested */ - LED_INV(ADM5120_GPIO_PIN2, "power", NULL ), - LED_INV(ADM5120_GPIO_P3L0, "lan1", NULL ), - LED_INV(ADM5120_GPIO_P2L0, "lan2", NULL ), - LED_INV(ADM5120_GPIO_P1L0, "lan3", NULL ), - LED_INV(ADM5120_GPIO_P0L0, "lan4", NULL ), - LED_INV(ADM5120_GPIO_P4L0, "wan", NULL ), - LED_INV(ADM5120_GPIO_P4L2, "wlan", NULL ), - LED_INV(ADM5120_GPIO_P2L2, "otist", NULL ), - LED_INV(ADM5120_GPIO_xxxx, "usb", NULL ), -}; -#endif - -/* - * Mikrotik boards - */ -#if defined(CONFIG_LEDS_ADM5120_EXPERIMENTAL) -LED_ARRAY(rb100) { /* FIXME: untested */ - LED_STD(ADM5120_GPIO_PIN6, "power", NULL ), - LED_STD(ADM5120_GPIO_PIN3, "user", NULL ), -}; -#endif - -LED_ARRAY(rb133) { - LED_STD(ADM5120_GPIO_PIN6, "power", NULL ), - LED_STD(ADM5120_GPIO_PIN5, "user", NULL ), -}; - -/* * Compex boards */ #if defined(CONFIG_LEDS_ADM5120_EXPERIMENTAL) @@ -168,6 +113,81 @@ LED_ARRAY(wp54g) { LED_INV(ADM5120_GPIO_P1L0, "lan2", NULL ), }; +/* + * Edimax boards + */ +LED_ARRAY(br6104k) { + LED_STD(ADM5120_GPIO_PIN0, "power", NULL ), + LED_INV(ADM5120_GPIO_P0L1, "wan_speed", NULL ), + LED_INV(ADM5120_GPIO_P0L0, "wan_lnkact", NULL ), + LED_INV(ADM5120_GPIO_P1L1, "lan1_speed", NULL ), + LED_INV(ADM5120_GPIO_P1L0, "lan1_lnkact", NULL ), + LED_INV(ADM5120_GPIO_P2L1, "lan2_speed", NULL ), + LED_INV(ADM5120_GPIO_P2L0, "lan2_lnkact", NULL ), + LED_INV(ADM5120_GPIO_P3L1, "lan3_speed", NULL ), + LED_INV(ADM5120_GPIO_P3L0, "lan3_lnkact", NULL ), + LED_INV(ADM5120_GPIO_P4L1, "lan4_speed", NULL ), + LED_INV(ADM5120_GPIO_P4L0, "lan4_lnkact", NULL ), +}; + +/* + * Mikrotik boards + */ +#if defined(CONFIG_LEDS_ADM5120_EXPERIMENTAL) +LED_ARRAY(rb100) { /* FIXME: untested */ + LED_STD(ADM5120_GPIO_PIN6, "power", NULL ), + LED_STD(ADM5120_GPIO_PIN3, "user", NULL ), +}; +#endif + +LED_ARRAY(rb133) { + LED_STD(ADM5120_GPIO_PIN6, "power", NULL ), + LED_STD(ADM5120_GPIO_PIN5, "user", NULL ), +}; + +/* + * ZyXEL boards + */ +#if defined(CONFIG_LEDS_ADM5120_EXPERIMENTAL) +LED_ARRAY(p334) { /* FIXME: untested */ + LED_INV(ADM5120_GPIO_xxxx, "power", NULL ), + LED_INV(ADM5120_GPIO_xxxx, "lan1", NULL ), + LED_INV(ADM5120_GPIO_xxxx, "lan2", NULL ), + LED_INV(ADM5120_GPIO_xxxx, "lan3", NULL ), + LED_INV(ADM5120_GPIO_xxxx, "lan4", NULL ), + LED_INV(ADM5120_GPIO_xxxx, "wan", NULL ), +}; +#endif + +LED_ARRAY(p334wt) { + LED_INV(ADM5120_GPIO_PIN2, "power", NULL ), + LED_INV(ADM5120_GPIO_P3L0, "lan1", NULL ), + LED_INV(ADM5120_GPIO_P2L0, "lan2", NULL ), + LED_INV(ADM5120_GPIO_P1L0, "lan3", NULL ), + LED_INV(ADM5120_GPIO_P0L0, "lan4", NULL ), + LED_INV(ADM5120_GPIO_P4L0, "wan", NULL ), + LED_INV(ADM5120_GPIO_P4L2, "wlan", NULL ), + LED_INV(ADM5120_GPIO_P2L2, "otist", NULL ), + LED_INV(ADM5120_GPIO_P1L2, "hidden", NULL ), +}; + +#if defined(CONFIG_LEDS_ADM5120_EXPERIMENTAL) +LED_ARRAY(p335) { /* FIXME: untested */ + LED_INV(ADM5120_GPIO_PIN2, "power", NULL ), + LED_INV(ADM5120_GPIO_P3L0, "lan1", NULL ), + LED_INV(ADM5120_GPIO_P2L0, "lan2", NULL ), + LED_INV(ADM5120_GPIO_P1L0, "lan3", NULL ), + LED_INV(ADM5120_GPIO_P0L0, "lan4", NULL ), + LED_INV(ADM5120_GPIO_P4L0, "wan", NULL ), + LED_INV(ADM5120_GPIO_P4L2, "wlan", NULL ), + LED_INV(ADM5120_GPIO_P2L2, "otist", NULL ), + LED_INV(ADM5120_GPIO_xxxx, "usb", NULL ), +}; +#endif + +/* + * Generic board + */ LED_ARRAY(generic) { #if defined(CONFIG_LEDS_ADM5120_DIAG) LED_STD(ADM5120_GPIO_PIN0, "gpio0", NULL ), @@ -204,15 +224,21 @@ LED_ARRAY(generic) { static struct mach_data machines[] __initdata = { MACH_DATA(MACH_ADM5120_GENERIC, generic), - MACH_DATA(MACH_ADM5120_P334WT, p334wt), + /* Compex */ MACH_DATA(MACH_ADM5120_WP54AG, wp54g), MACH_DATA(MACH_ADM5120_WP54G, wp54g), MACH_DATA(MACH_ADM5120_WP54G_WRT, wp54g), MACH_DATA(MACH_ADM5120_WPP54AG, wp54g), MACH_DATA(MACH_ADM5120_WPP54G, wp54g), + /* Edimax */ + MACH_DATA(MACH_ADM5120_BR6104K, br6104k), + /* Mikrotik */ MACH_DATA(MACH_ADM5120_RB_133, rb133), MACH_DATA(MACH_ADM5120_RB_133C, rb133), + /* ZyXEL */ + MACH_DATA(MACH_ADM5120_P334WT, p334wt), #if defined(CONFIG_LEDS_ADM5120_EXPERIMENTAL) + /* untested */ MACH_DATA(MACH_ADM5120_P334, p334), MACH_DATA(MACH_ADM5120_P335, p335), MACH_DATA(MACH_ADM5120_RB_111, rb100), |