aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/files
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2009-09-06 13:54:17 +0000
committerFlorian Fainelli <florian@openwrt.org>2009-09-06 13:54:17 +0000
commit65fa1debdae9f85f953d70f2eeba0814bfc4d9ba (patch)
tree9b05bdfef1f929d4b476e299e8926798fba1ac21 /target/linux/brcm63xx/files
parent77c4df9e45673bb810a83ea5c329e78586935a41 (diff)
downloadupstream-65fa1debdae9f85f953d70f2eeba0814bfc4d9ba.tar.gz
upstream-65fa1debdae9f85f953d70f2eeba0814bfc4d9ba.tar.bz2
upstream-65fa1debdae9f85f953d70f2eeba0814bfc4d9ba.zip
add infrastructure to register gpio-input reset button
SVN-Revision: 17526
Diffstat (limited to 'target/linux/brcm63xx/files')
-rw-r--r--target/linux/brcm63xx/files/arch/mips/bcm63xx/boards/board_bcm963xx.c16
-rw-r--r--target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/board_bcm963xx.h3
2 files changed, 19 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/files/arch/mips/bcm63xx/boards/board_bcm963xx.c b/target/linux/brcm63xx/files/arch/mips/bcm63xx/boards/board_bcm963xx.c
index 2c56a3cf78..0a8ecbd36a 100644
--- a/target/linux/brcm63xx/files/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/target/linux/brcm63xx/files/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -802,6 +802,17 @@ static struct platform_device bcm63xx_gpio_leds = {
.dev.platform_data = &bcm63xx_led_data,
};
+struct gpio_buttons_platform_data bcm63xx_gpio_buttons_data = {
+ .poll_interval = 20,
+};
+
+struct platform_device bcm63xx_gpio_buttons_device = {
+ .name = "gpio-buttons",
+ .id = 0,
+ .dev.platform_data = &bcm63xx_gpio_buttons_data,
+};
+
+
/*
* third stage init callback, register all board devices.
*/
@@ -869,6 +880,11 @@ int __init board_register_devices(void)
platform_device_register(&bcm63xx_gpio_leds);
+ bcm63xx_gpio_buttons_data.nbuttons = 1,
+ bcm63xx_gpio_buttons_data.buttons = board.reset_btm;
+
+ platform_device_register(&bcm63xx_gpio_buttons);
+
return 0;
}
diff --git a/target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/board_bcm963xx.h b/target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/board_bcm963xx.h
index d154b2859e..e07a07c88c 100644
--- a/target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/board_bcm963xx.h
+++ b/target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/board_bcm963xx.h
@@ -56,6 +56,9 @@ struct board_info {
/* GPIO LEDs */
struct gpio_led leds[5];
+
+ /* Reset button */
+ unsigned int reset_btn;
};
#endif /* ! BOARD_BCM963XX_H_ */