mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-01-27 14:41:06 +02:00
ar71xx: register GPIO button on the Bullet M
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17809 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
4f961361c6
commit
a5291fd3ca
@ -36,6 +36,7 @@
|
|||||||
#define UBNT_BULLET_M_GPIO_LED_L2 1
|
#define UBNT_BULLET_M_GPIO_LED_L2 1
|
||||||
#define UBNT_BULLET_M_GPIO_LED_L3 11
|
#define UBNT_BULLET_M_GPIO_LED_L3 11
|
||||||
#define UBNT_BULLET_M_GPIO_LED_L4 7
|
#define UBNT_BULLET_M_GPIO_LED_L4 7
|
||||||
|
#define UBNT_BULLET_M_GPIO_BTN_RESET 12
|
||||||
|
|
||||||
#define UBNT_BUTTONS_POLL_INTERVAL 20
|
#define UBNT_BUTTONS_POLL_INTERVAL 20
|
||||||
|
|
||||||
@ -135,6 +136,17 @@ static struct gpio_button ubnt_gpio_buttons[] __initdata = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct gpio_button ubnt_bullet_m_gpio_buttons[] __initdata = {
|
||||||
|
{
|
||||||
|
.desc = "reset",
|
||||||
|
.type = EV_KEY,
|
||||||
|
.code = BTN_0,
|
||||||
|
.threshold = 5,
|
||||||
|
.gpio = UBNT_BULLET_M_GPIO_BTN_RESET,
|
||||||
|
.active_low = 1,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
static void __init ubnt_generic_setup(void)
|
static void __init ubnt_generic_setup(void)
|
||||||
{
|
{
|
||||||
ar71xx_add_device_spi(NULL, ubnt_spi_info,
|
ar71xx_add_device_spi(NULL, ubnt_spi_info,
|
||||||
@ -249,6 +261,10 @@ static void __init ubnt_bullet_m_setup(void)
|
|||||||
|
|
||||||
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(ubnt_bullet_m_leds_gpio),
|
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(ubnt_bullet_m_leds_gpio),
|
||||||
ubnt_bullet_m_leds_gpio);
|
ubnt_bullet_m_leds_gpio);
|
||||||
|
|
||||||
|
ar71xx_add_device_gpio_buttons(-1, UBNT_BUTTONS_POLL_INTERVAL,
|
||||||
|
ARRAY_SIZE(ubnt_bullet_m_gpio_buttons),
|
||||||
|
ubnt_bullet_m_gpio_buttons);
|
||||||
}
|
}
|
||||||
|
|
||||||
MIPS_MACHINE(AR71XX_MACH_UBNT_BULLET_M, "Ubiquiti Bullet M", ubnt_bullet_m_setup);
|
MIPS_MACHINE(AR71XX_MACH_UBNT_BULLET_M, "Ubiquiti Bullet M", ubnt_bullet_m_setup);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user