generic: ar8216: use the generic get_port_link implementation
[openwrt.git] / target / linux / lantiq / patches-2.6.32 / 520-register_buttons.patch
1 --- a/arch/mips/lantiq/xway/devices.c
2 +++ b/arch/mips/lantiq/xway/devices.c
3 @@ -154,6 +154,26 @@
4 lantiq_emulate_madwifi_eep = 1;
5 }
6
7 +/* gpio buttons */
8 +static struct gpio_buttons_platform_data ltq_gpio_buttons_platform_data;
9 +
10 +static struct platform_device ltq_gpio_buttons_platform_device =
11 +{
12 + .name = "gpio-buttons",
13 + .id = 0,
14 + .dev = {
15 + .platform_data = (void *) &ltq_gpio_buttons_platform_data,
16 + },
17 +};
18 +
19 +void __init
20 +ltq_register_gpio_buttons(struct gpio_button *buttons, int cnt)
21 +{
22 + ltq_gpio_buttons_platform_data.buttons = buttons;
23 + ltq_gpio_buttons_platform_data.nbuttons = cnt;
24 + platform_device_register(&ltq_gpio_buttons_platform_device);
25 +}
26 +
27 static struct resource ltq_spi_resources[] = {
28 {
29 .start = LTQ_SSC_BASE_ADDR,
30 --- a/arch/mips/lantiq/xway/devices.h
31 +++ b/arch/mips/lantiq/xway/devices.h
32 @@ -11,6 +11,7 @@
33
34 #include "../devices.h"
35 #include <linux/phy.h>
36 +#include <linux/gpio_buttons.h>
37
38 extern void ltq_register_gpio(void);
39 extern void ltq_register_gpio_stp(void);
40 @@ -18,5 +19,6 @@
41 extern void ltq_register_etop(struct ltq_eth_data *eth);
42 extern void ltq_register_gpio_ebu(unsigned int value);
43 extern void ltq_register_madwifi_eep(void);
44 +extern void ltq_register_gpio_buttons(struct gpio_button *buttons, int cnt);
45
46 #endif
This page took 0.053619 seconds and 5 git commands to generate.