projects
/
oweals
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ar71xx: add an id argument to ar71xx_add_device_mdio
[oweals/openwrt.git]
/
target
/
linux
/
ar71xx
/
files
/
arch
/
mips
/
ar71xx
/
mach-ja76pf.c
diff --git
a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ja76pf.c
b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ja76pf.c
index d39de3c4d03de38914dc6b5184226aed9ecb8bca..0e21fdb58e9ebd7a7e60d8119fb72a68ea9b8dc3 100644
(file)
--- a/
target/linux/ar71xx/files/arch/mips/ar71xx/mach-ja76pf.c
+++ b/
target/linux/ar71xx/files/arch/mips/ar71xx/mach-ja76pf.c
@@
-15,12
+15,14
@@
#include "dev-usb.h"
#include "dev-leds-gpio.h"
#include "dev-usb.h"
#include "dev-leds-gpio.h"
-#define JA76PF_BUTTONS_POLL_INTERVAL 20
+#define JA76PF_KEYS_POLL_INTERVAL 20 /* msecs */
+#define JA76PF_KEYS_DEBOUNCE_INTERVAL (3 * JA76PF_KEYS_POLL_INTERVAL)
#define JA76PF_GPIO_I2C_SCL 0
#define JA76PF_GPIO_I2C_SDA 1
#define JA76PF_GPIO_LED_1 5
#define JA76PF_GPIO_LED_2 4
#define JA76PF_GPIO_I2C_SCL 0
#define JA76PF_GPIO_I2C_SDA 1
#define JA76PF_GPIO_LED_1 5
#define JA76PF_GPIO_LED_2 4
+#define JA76PF_GPIO_LED_3 3
#define JA76PF_GPIO_BTN_RESET 11
static struct gpio_led ja76pf_leds_gpio[] __initdata = {
#define JA76PF_GPIO_BTN_RESET 11
static struct gpio_led ja76pf_leds_gpio[] __initdata = {
@@
-32,15
+34,19
@@
static struct gpio_led ja76pf_leds_gpio[] __initdata = {
.name = "ja76pf:green:led2",
.gpio = JA76PF_GPIO_LED_2,
.active_low = 1,
.name = "ja76pf:green:led2",
.gpio = JA76PF_GPIO_LED_2,
.active_low = 1,
+ }, {
+ .name = "ja76pf:green:led3",
+ .gpio = JA76PF_GPIO_LED_3,
+ .active_low = 1,
}
};
}
};
-static struct gpio_
button ja76pf_gpio_button
s[] __initdata = {
+static struct gpio_
keys_button ja76pf_gpio_key
s[] __initdata = {
{
.desc = "reset",
.type = EV_KEY,
.code = KEY_RESTART,
{
.desc = "reset",
.type = EV_KEY,
.code = KEY_RESTART,
- .
threshold = 3
,
+ .
debounce_interval = JA76PF_KEYS_DEBOUNCE_INTERVAL
,
.gpio = JA76PF_GPIO_BTN_RESET,
.active_low = 1,
}
.gpio = JA76PF_GPIO_BTN_RESET,
.active_low = 1,
}
@@
-67,7
+73,7
@@
static void __init ja76pf_init(void)
{
ar71xx_add_device_m25p80(NULL);
{
ar71xx_add_device_m25p80(NULL);
- ar71xx_add_device_mdio(~JA76PF_MDIO_PHYMASK);
+ ar71xx_add_device_mdio(
0,
~JA76PF_MDIO_PHYMASK);
ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
ar71xx_eth0_data.phy_mask = JA76PF_LAN_PHYMASK;
ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
ar71xx_eth0_data.phy_mask = JA76PF_LAN_PHYMASK;
@@
-85,9
+91,9
@@
static void __init ja76pf_init(void)
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(ja76pf_leds_gpio),
ja76pf_leds_gpio);
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(ja76pf_leds_gpio),
ja76pf_leds_gpio);
- ar71xx_
add_device_gpio_buttons(-1, JA76PF_BUTTON
S_POLL_INTERVAL,
-
ARRAY_SIZE(ja76pf_gpio_button
s),
-
ja76pf_gpio_button
s);
+ ar71xx_
register_gpio_keys_polled(-1, JA76PF_KEY
S_POLL_INTERVAL,
+
ARRAY_SIZE(ja76pf_gpio_key
s),
+
ja76pf_gpio_key
s);
ar71xx_add_device_usb();
pb42_pci_init();
ar71xx_add_device_usb();
pb42_pci_init();