source: branches/backfire/target/linux/lantiq/patches-2.6.32/520-register_buttons.patch @ 27546

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

add new lantiq target

File size: 1.3 KB
  • arch/mips/lantiq/xway/devices.c

    a b  
    154154        lantiq_emulate_madwifi_eep = 1; 
    155155} 
    156156 
     157/* gpio buttons */ 
     158static struct gpio_buttons_platform_data ltq_gpio_buttons_platform_data; 
     159 
     160static struct platform_device ltq_gpio_buttons_platform_device = 
     161{ 
     162        .name = "gpio-buttons", 
     163        .id = 0, 
     164        .dev = { 
     165                .platform_data = (void *) &ltq_gpio_buttons_platform_data, 
     166        }, 
     167}; 
     168 
     169void __init 
     170ltq_register_gpio_buttons(struct gpio_button *buttons, int cnt) 
     171{ 
     172        ltq_gpio_buttons_platform_data.buttons = buttons; 
     173        ltq_gpio_buttons_platform_data.nbuttons = cnt; 
     174        platform_device_register(&ltq_gpio_buttons_platform_device); 
     175} 
     176 
    157177static struct resource ltq_spi_resources[] = { 
    158178        { 
    159179                .start  = LTQ_SSC_BASE_ADDR, 
  • arch/mips/lantiq/xway/devices.h

    a b  
    1111 
    1212#include "../devices.h" 
    1313#include <linux/phy.h> 
     14#include <linux/gpio_buttons.h> 
    1415 
    1516extern void ltq_register_gpio(void); 
    1617extern void ltq_register_gpio_stp(void); 
     
    1819extern void ltq_register_etop(struct ltq_eth_data *eth); 
    1920extern void ltq_register_gpio_ebu(unsigned int value); 
    2021extern void ltq_register_madwifi_eep(void); 
     22extern void ltq_register_gpio_buttons(struct gpio_button *buttons, int cnt); 
    2123 
    2224#endif 
Note: See TracBrowser for help on using the repository browser.