projects
/
openwrt
/
svn-archive
/
archive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ar71xx: use the gpio_keys_polled driver instead of gpio_buttons
[openwrt/svn-archive/archive.git]
/
target
/
linux
/
ar71xx
/
files
/
arch
/
mips
/
ar71xx
/
mach-pb42.c
diff --git
a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c
b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c
index d14cc9b9540dc2f2ae59fca77e463d5cedac5282..118a54e99ba8efda66ec762a0764f6a00c0f6ee5 100644
(file)
--- a/
target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c
+++ b/
target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c
@@
-18,24
+18,25
@@
#include "dev-pb42-pci.h"
#include "dev-usb.h"
#include "dev-pb42-pci.h"
#include "dev-usb.h"
-#define PB42_BUTTONS_POLL_INTERVAL 20
+#define PB42_KEYS_POLL_INTERVAL 20 /* msecs */
+#define PB42_KEYS_DEBOUNCE_INTERVAL (3 * PB42_KEYS_POLL_INTERVAL)
#define PB42_GPIO_BTN_SW4 8
#define PB42_GPIO_BTN_SW5 3
#define PB42_GPIO_BTN_SW4 8
#define PB42_GPIO_BTN_SW5 3
-static struct gpio_
button pb42_gpio_button
s[] __initdata = {
+static struct gpio_
keys_button pb42_gpio_key
s[] __initdata = {
{
.desc = "sw4",
.type = EV_KEY,
.code = BTN_0,
{
.desc = "sw4",
.type = EV_KEY,
.code = BTN_0,
- .
threshold = 3
,
+ .
debounce_interval = PB42_KEYS_DEBOUNCE_INTERVAL
,
.gpio = PB42_GPIO_BTN_SW4,
.active_low = 1,
.gpio = PB42_GPIO_BTN_SW4,
.active_low = 1,
- }
, {
+ }, {
.desc = "sw5",
.type = EV_KEY,
.code = BTN_1,
.desc = "sw5",
.type = EV_KEY,
.code = BTN_1,
- .
threshold = 3
,
+ .
debounce_interval = PB42_KEYS_DEBOUNCE_INTERVAL
,
.gpio = PB42_GPIO_BTN_SW5,
.active_low = 1,
}
.gpio = PB42_GPIO_BTN_SW5,
.active_low = 1,
}
@@
-63,9
+64,9
@@
static void __init pb42_init(void)
ar71xx_add_device_eth(0);
ar71xx_add_device_eth(1);
ar71xx_add_device_eth(0);
ar71xx_add_device_eth(1);
- ar71xx_
add_device_gpio_buttons(-1, PB42_BUTTON
S_POLL_INTERVAL,
-
ARRAY_SIZE(pb42_gpio_button
s),
-
pb42_gpio_button
s);
+ ar71xx_
register_gpio_keys_polled(-1, PB42_KEY
S_POLL_INTERVAL,
+
ARRAY_SIZE(pb42_gpio_key
s),
+
pb42_gpio_key
s);
pb42_pci_init();
}
pb42_pci_init();
}