ubus: update to latest version, includes a small bugfix for object call replies
[openwrt.git] / target / linux / lantiq / patches-3.0 / 520-register_buttons.patch
1 --- a/arch/mips/lantiq/xway/devices.c
2 +++ b/arch/mips/lantiq/xway/devices.c
3 @@ -131,6 +131,26 @@ ltq_register_madwifi_eep(void)
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 @@ -12,6 +12,7 @@
33  #include "../devices.h"
34  #include <linux/phy.h>
35  #include <linux/spi/spi.h>
36 +#include <linux/gpio_buttons.h>
37  
38  extern void ltq_register_gpio(void);
39  extern void ltq_register_gpio_stp(void);
40 @@ -20,5 +21,6 @@ extern void ltq_register_etop(struct ltq
41  extern void ltq_register_spi(struct ltq_spi_platform_data *pdata,
42         struct spi_board_info const *info, unsigned n);
43  extern void ltq_register_madwifi_eep(void);
44 +extern void ltq_register_gpio_buttons(struct gpio_button *buttons, int cnt);
45  
46  #endif