projects
/
oweals
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ar71xx: fix a compiler warning
[oweals/openwrt.git]
/
target
/
linux
/
ar71xx
/
files
/
arch
/
mips
/
ar71xx
/
mach-pb92.c
diff --git
a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb92.c
b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb92.c
index 83a1e66cef5c759595b1507de5e83706f4e8b1b4..4c5d3ab4a8b97465bd99233f5522524bbee587be 100644
(file)
--- a/
target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb92.c
+++ b/
target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb92.c
@@
-56,25
+56,25
@@
static struct flash_platform_data pb92_flash_data = {
#endif
};
#endif
};
-
-#define PB92_
BUTTONS_POLL_INTERVAL 20
+#define PB92_KEYS_POLL_INTERVAL 20 /* msecs */
+#define PB92_
KEYS_DEBOUNCE_INTERVAL (3 * PB92_KEYS_POLL_INTERVAL)
#define PB92_GPIO_BTN_SW4 8
#define PB92_GPIO_BTN_SW5 3
#define PB92_GPIO_BTN_SW4 8
#define PB92_GPIO_BTN_SW5 3
-static struct gpio_
button pb92_gpio_button
s[] __initdata = {
+static struct gpio_
keys_button pb92_gpio_key
s[] __initdata = {
{
.desc = "sw4",
.type = EV_KEY,
.code = BTN_0,
{
.desc = "sw4",
.type = EV_KEY,
.code = BTN_0,
- .
threshold = 3
,
+ .
debounce_interval = PB92_KEYS_DEBOUNCE_INTERVAL
,
.gpio = PB92_GPIO_BTN_SW4,
.active_low = 1,
}, {
.desc = "sw5",
.type = EV_KEY,
.code = BTN_1,
.gpio = PB92_GPIO_BTN_SW4,
.active_low = 1,
}, {
.desc = "sw5",
.type = EV_KEY,
.code = BTN_1,
- .
threshold = 3
,
+ .
debounce_interval = PB92_KEYS_DEBOUNCE_INTERVAL
,
.gpio = PB92_GPIO_BTN_SW5,
.active_low = 1,
}
.gpio = PB92_GPIO_BTN_SW5,
.active_low = 1,
}
@@
-86,23
+86,18
@@
static void __init pb92_init(void)
ar71xx_add_device_m25p80(&pb92_flash_data);
ar71xx_add_device_m25p80(&pb92_flash_data);
- ar71xx_add_device_mdio(
~0
);
+ ar71xx_add_device_mdio(
0, ~BIT(0)
);
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
+ ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_R
G
MII;
ar71xx_eth0_data.speed = SPEED_1000;
ar71xx_eth0_data.duplex = DUPLEX_FULL;
ar71xx_eth0_data.speed = SPEED_1000;
ar71xx_eth0_data.duplex = DUPLEX_FULL;
-
- ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
+ ar71xx_eth0_data.phy_mask = BIT(0);
ar71xx_add_device_eth(0);
ar71xx_add_device_eth(0);
- ar71xx_add_device_eth(1);
- ar71xx_
add_device_gpio_buttons(-1, PB92_BUTTON
S_POLL_INTERVAL,
-
ARRAY_SIZE(pb92_gpio_button
s),
-
pb92_gpio_button
s);
+ ar71xx_
register_gpio_keys_polled(-1, PB92_KEY
S_POLL_INTERVAL,
+
ARRAY_SIZE(pb92_gpio_key
s),
+
pb92_gpio_key
s);
pb9x_pci_init();
}
pb9x_pci_init();
}