diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2008-12-15 11:04:16 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2008-12-15 11:04:16 +0000 |
commit | 0897bff8216680f407d0885d0f9b59df3c403527 (patch) | |
tree | edf23fb79f6108249bff17e75753f2b2750d96e6 /target/linux | |
parent | 8b7534d6e6f0286b13b02e74d362a67769fcc00d (diff) | |
download | master-187ad058-0897bff8216680f407d0885d0f9b59df3c403527.tar.gz master-187ad058-0897bff8216680f407d0885d0f9b59df3c403527.tar.bz2 master-187ad058-0897bff8216680f407d0885d0f9b59df3c403527.zip |
[ar71xx] tew-632brp: register GPIO buttons
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13647 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c index 3dc3432e6c..7a5c1b622f 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c @@ -14,6 +14,7 @@ #include <linux/mtd/partitions.h> #include <linux/spi/spi.h> #include <linux/spi/flash.h> +#include <linux/input.h> #include <asm/mips_machine.h> @@ -22,6 +23,9 @@ #define TEW_632BRP_GPIO_LED_WPS 3 #define TEW_632BRP_GPIO_LED_WLAN 6 +#define TEW_632BRP_GPIO_BTN_RESET 21 + +#define TEW_632BRP_BUTTONS_POLL_INTERVAL 20 #ifdef CONFIG_MTD_PARTITIONS static struct mtd_partition tew_632brp_partitions[] = { @@ -84,6 +88,16 @@ static struct gpio_led tew_632brp_leds_gpio[] __initdata = { } }; +static struct gpio_button tew_632brp_gpio_buttons[] __initdata = { + { + .desc = "reset", + .type = EV_KEY, + .code = BTN_0, + .threshold = 5, + .gpio = TEW_632BRP_GPIO_BTN_RESET, + } +}; + static void __init tew_632brp_setup(void) { ar71xx_add_device_mdio(0xfffffffe); @@ -100,6 +114,10 @@ static void __init tew_632brp_setup(void) ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(tew_632brp_leds_gpio), tew_632brp_leds_gpio); + + ar71xx_add_device_gpio_buttons(-1, TEW_632BRP_BUTTONS_POLL_INTERVAL, + ARRAY_SIZE(tew_632brp_gpio_buttons), + tew_632brp_gpio_buttons); } MIPS_MACHINE(AR71XX_MACH_TEW_632BRP, "TRENDnet TEW-632BRP", tew_632brp_setup); |