summaryrefslogtreecommitdiffstats
path: root/target/linux/adm5120-2.6/files/include
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-08-06 17:25:49 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-08-06 17:25:49 +0000
commitf6e8fec1b4299d418b12953879ecb68f88b84894 (patch)
treeede62d1de04b49c021b101f94c4fe1d39743591a /target/linux/adm5120-2.6/files/include
parent3ac745fdfb96b1efef0f0fd41ebb3ba9a211c2c8 (diff)
[adm5120] add special values for GPIO lines in switch
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8351 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/adm5120-2.6/files/include')
-rw-r--r--target/linux/adm5120-2.6/files/include/asm-mips/mach-adm5120/gpio.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/target/linux/adm5120-2.6/files/include/asm-mips/mach-adm5120/gpio.h b/target/linux/adm5120-2.6/files/include/asm-mips/mach-adm5120/gpio.h
index 97e187ea0..58147d393 100644
--- a/target/linux/adm5120-2.6/files/include/asm-mips/mach-adm5120/gpio.h
+++ b/target/linux/adm5120-2.6/files/include/asm-mips/mach-adm5120/gpio.h
@@ -26,6 +26,8 @@
#ifndef _ADM5120_GPIO_H_
#define _ADM5120_GPIO_H_
+#include <asm/mach-adm5120/adm5120_switch.h>
+
#define ADM5120_GPIO_PIN0 0
#define ADM5120_GPIO_PIN1 1
#define ADM5120_GPIO_PIN2 2
@@ -52,6 +54,21 @@
#define ADM5120_GPIO_MAX 22
#define ADM5120_GPIO_COUNT ADM5120_GPIO_MAX+1
+#define ADM5120_GPIO_LOW 0
+#define ADM5120_GPIO_HIGH 1
+
+#define ADM5120_GPIO_SWITCH 0x10
+#define ADM5120_GPIO_FLASH (ADM5120_GPIO_SWITCH | LED_MODE_FLASH)
+#define ADM5120_GPIO_LINK (ADM5120_GPIO_SWITCH | LED_MODE_LINK)
+#define ADM5120_GPIO_SPEED (ADM5120_GPIO_SWITCH | LED_MODE_SPEED)
+#define ADM5120_GPIO_DUPLEX (ADM5120_GPIO_SWITCH | LED_MODE_DUPLEX)
+#define ADM5120_GPIO_ACT (ADM5120_GPIO_SWITCH | LED_MODE_ACT)
+#define ADM5120_GPIO_COLL (ADM5120_GPIO_SWITCH | LED_MODE_COLL)
+#define ADM5120_GPIO_LINK_ACT (ADM5120_GPIO_SWITCH | LED_MODE_LINK_ACT)
+#define ADM5120_GPIO_DUPLEX_COLL (ADM5120_GPIO_SWITCH | LED_MODE_DUPLEX_COLL)
+#define ADM5120_GPIO_10M_ACT (ADM5120_GPIO_SWITCH | LED_MODE_10M_ACT)
+#define ADM5120_GPIO_100M_ACT (ADM5120_GPIO_SWITCH | LED_MODE_100M_ACT)
+
extern int adm5120_gpio_direction_input(unsigned gpio);
extern int adm5120_gpio_direction_output(unsigned gpio, int value);
extern int adm5120_gpio_get_value(unsigned gpio);