#define WLI_TX4_AG300N_GPIO_BUTTON_BW_SWITCH 8
#define WLI_TX4_AG300N_GPIO_BUTTON_RESET 9
-#define WLI_TX4_AG300N_BUTTONS_POLL_INTERVAL 20
+#define WLI_TX4_AG300N_KEYS_POLL_INTERVAL 20
+#define WLI_TX4_AG300N_KEYS_DEBOUNCE_INTERVAL (3 * WLI_TX4_AG300N_KEYS_POLL_INTERVAL)
-#ifdef CONFIG_MTD_PARTITIONS
static struct mtd_partition wli_tx4_ag300n_partitions[] = {
{
.name = "u-boot",
.size = 0x3a0000,
},
};
-#endif /* CONFIG_MTD_PARTITIONS */
static struct physmap_flash_data wli_tx4_ag300n_flash_data = {
-#ifdef CONFIG_MTD_PARTITIONS
.nr_parts = ARRAY_SIZE(wli_tx4_ag300n_partitions),
.parts = wli_tx4_ag300n_partitions,
-#endif
};
static struct gpio_led wli_tx4_ag300n_leds_gpio[] __initdata = {
},
};
-static struct gpio_button wli_tx4_ag300n_gpio_buttons[] __initdata = {
+static struct gpio_keys_button wli_tx4_ag300n_gpio_buttons[] __initdata = {
{
.desc = "Reset button",
.type = EV_KEY,
.code = KEY_RESTART,
- .threshold = 3,
+ .debounce_interval = WLI_TX4_AG300N_KEYS_DEBOUNCE_INTERVAL,
.gpio = WLI_TX4_AG300N_GPIO_BUTTON_RESET,
.active_low = 1,
},
.desc = "AOSS button",
.type = EV_KEY,
.code = KEY_WPS_BUTTON,
- .threshold = 3,
+ .debounce_interval = WLI_TX4_AG300N_KEYS_DEBOUNCE_INTERVAL,
.gpio = WLI_TX4_AG300N_GPIO_BUTTON_AOSS,
.active_low = 1,
},
.desc = "Bandwidth switch",
.type = EV_KEY,
.code = BTN_0,
- .threshold = 3,
+ .debounce_interval = WLI_TX4_AG300N_KEYS_DEBOUNCE_INTERVAL,
.gpio = WLI_TX4_AG300N_GPIO_BUTTON_BW_SWITCH,
.active_low = 0,
},
ramips_register_gpio_leds(-1, ARRAY_SIZE(wli_tx4_ag300n_leds_gpio),
wli_tx4_ag300n_leds_gpio);
- ramips_register_gpio_buttons(-1, WLI_TX4_AG300N_BUTTONS_POLL_INTERVAL,
+ ramips_register_gpio_buttons(-1, WLI_TX4_AG300N_KEYS_POLL_INTERVAL,
ARRAY_SIZE(wli_tx4_ag300n_gpio_buttons),
wli_tx4_ag300n_gpio_buttons);