summaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-all0256n.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ramips/files/arch/mips/ralink/rt305x/mach-all0256n.c')
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/mach-all0256n.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-all0256n.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-all0256n.c
index 3a53e16d0..cd25c4345 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-all0256n.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-all0256n.c
@@ -28,7 +28,8 @@
#define ALL0256N_GPIO_LED_RSSI_LOW 14
#define ALL0256N_GPIO_LED_RSSI_MED 12
#define ALL0256N_GPIO_LED_RSSI_HIGH 13
-#define ALL0256N_BUTTONS_POLL_INTERVAL 20
+#define ALL0256N_KEYS_POLL_INTERVAL 20
+#define ALL0256N_KEYS_DEBOUNCE_INTERVAL (3 * ALL0256N_KEYS_POLL_INTERVAL)
static struct mtd_partition all0256n_partitions[] = {
{
@@ -76,12 +77,12 @@ struct spi_board_info all0256n_spi_slave_info[] __initdata = {
},
};
-static struct gpio_button all0256n_gpio_buttons[] __initdata = {
+static struct gpio_keys_button all0256n_gpio_buttons[] __initdata = {
{
.desc = "reset",
.type = EV_KEY,
.code = KEY_RESTART,
- .threshold = 3,
+ .debounce_interval = ALL0256N_KEYS_DEBOUNCE_INTERVAL,
.gpio = ALL0256N_GPIO_BUTTON_RESET,
.active_low = 1,
}
@@ -112,7 +113,7 @@ static void __init all0256n_init(void)
rt305x_register_ethernet();
ramips_register_gpio_leds(-1, ARRAY_SIZE(all0256n_leds_gpio),
all0256n_leds_gpio);
- ramips_register_gpio_buttons(-1, ALL0256N_BUTTONS_POLL_INTERVAL,
+ ramips_register_gpio_buttons(-1, ALL0256N_KEYS_POLL_INTERVAL,
ARRAY_SIZE(all0256n_gpio_buttons),
all0256n_gpio_buttons);
rt305x_register_wifi();