source: trunk/target/linux/lantiq/patches-3.0/520-register_buttons.patch @ 28308

Last change on this file since 28308 was 28308, checked in by blogic, 5 years ago

[lantiq]

  • rebase 3.0 patches
  • fold some fixes into existing patches
File size: 1.3 KB
  • arch/mips/lantiq/xway/devices.c

    a b ltq_register_madwifi_eep(void) 
    131131        lantiq_emulate_madwifi_eep = 1; 
    132132} 
    133133 
     134/* gpio buttons */ 
     135static struct gpio_buttons_platform_data ltq_gpio_buttons_platform_data; 
     136 
     137static struct platform_device ltq_gpio_buttons_platform_device = 
     138{ 
     139        .name = "gpio-buttons", 
     140        .id = 0, 
     141        .dev = { 
     142                .platform_data = (void *) &ltq_gpio_buttons_platform_data, 
     143        }, 
     144}; 
     145 
     146void __init 
     147ltq_register_gpio_buttons(struct gpio_button *buttons, int cnt) 
     148{ 
     149        ltq_gpio_buttons_platform_data.buttons = buttons; 
     150        ltq_gpio_buttons_platform_data.nbuttons = cnt; 
     151        platform_device_register(&ltq_gpio_buttons_platform_device); 
     152} 
     153 
    134154static struct resource ltq_spi_resources[] = { 
    135155        { 
    136156                .start  = LTQ_SSC_BASE_ADDR, 
  • arch/mips/lantiq/xway/devices.h

    a b  
    1212#include "../devices.h" 
    1313#include <linux/phy.h> 
    1414#include <linux/spi/spi.h> 
     15#include <linux/gpio_buttons.h> 
    1516 
    1617extern void ltq_register_gpio(void); 
    1718extern void ltq_register_gpio_stp(void); 
    extern void ltq_register_etop(struct ltq 
    2021extern void ltq_register_spi(struct ltq_spi_platform_data *pdata, 
    2122        struct spi_board_info const *info, unsigned n); 
    2223extern void ltq_register_madwifi_eep(void); 
     24extern void ltq_register_gpio_buttons(struct gpio_button *buttons, int cnt); 
    2325 
    2426#endif 
Note: See TracBrowser for help on using the repository browser.