Changeset 18937


Ignore:
Timestamp:
2009-12-26T15:19:01+01:00 (8 years ago)
Author:
juhosg
Message:

ar71xx: move gpio-buttons support into a spearate file

Location:
trunk/target/linux/ar71xx
Files:
2 added
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/config-2.6.30

    r18936 r18937  
    77CONFIG_AR71XX_DEV_AP94_PCI=y 
    88CONFIG_AR71XX_DEV_AR913X_WMAC=y 
     9CONFIG_AR71XX_DEV_GPIO_BUTTONS=y 
    910CONFIG_AR71XX_DEV_LEDS_GPIO=y 
    1011CONFIG_AR71XX_DEV_M25P80=y 
  • trunk/target/linux/ar71xx/config-2.6.31

    r18936 r18937  
    99CONFIG_AR71XX_DEV_AP94_PCI=y 
    1010CONFIG_AR71XX_DEV_AR913X_WMAC=y 
     11CONFIG_AR71XX_DEV_GPIO_BUTTONS=y 
    1112CONFIG_AR71XX_DEV_LEDS_GPIO=y 
    1213CONFIG_AR71XX_DEV_M25P80=y 
  • trunk/target/linux/ar71xx/config-2.6.32

    r18936 r18937  
    99CONFIG_AR71XX_DEV_AP94_PCI=y 
    1010CONFIG_AR71XX_DEV_AR913X_WMAC=y 
     11CONFIG_AR71XX_DEV_GPIO_BUTTONS=y 
    1112CONFIG_AR71XX_DEV_LEDS_GPIO=y 
    1213CONFIG_AR71XX_DEV_M25P80=y 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig

    r18936 r18937  
    77        select AR71XX_DEV_M25P80 
    88        select AR71XX_DEV_AR913X_WMAC 
     9        select AR71XX_DEV_GPIO_BUTTONS 
    910        select AR71XX_DEV_LEDS_GPIO 
    1011        default y 
     
    1314        bool "Atheros AP83 board support" 
    1415        select AR71XX_DEV_AR913X_WMAC 
     16        select AR71XX_DEV_GPIO_BUTTONS 
    1517        select AR71XX_DEV_LEDS_GPIO 
    1618        default y 
     
    2022        select AR71XX_DEV_M25P80 
    2123        select AR71XX_DEV_AR913X_WMAC 
     24        select AR71XX_DEV_GPIO_BUTTONS 
    2225        select AR71XX_DEV_LEDS_GPIO 
    2326        default y 
     
    2730        select AR71XX_DEV_M25P80 
    2831        select AR71XX_DEV_AP94_PCI if PCI 
     32        select AR71XX_DEV_GPIO_BUTTONS 
    2933        select AR71XX_DEV_LEDS_GPIO 
    3034        default y 
     
    3337        bool "Atheros PB42 board support" 
    3438        select AR71XX_DEV_M25P80 
     39        select AR71XX_DEV_GPIO_BUTTONS 
    3540        select AR71XX_DEV_PB42_PCI if PCI 
    3641        default y 
     
    3843config AR71XX_MACH_PB44 
    3944        bool "Atheros PB44 board support" 
     45        select AR71XX_DEV_GPIO_BUTTONS 
    4046        select AR71XX_DEV_PB42_PCI if PCI 
    4147        select AR71XX_DEV_LEDS_GPIO 
     
    4551        bool "AzureWave AW-NR580 board support" 
    4652        select AR71XX_DEV_M25P80 
     53        select AR71XX_DEV_GPIO_BUTTONS 
    4754        select AR71XX_DEV_PB42_PCI if PCI 
    4855        select AR71XX_DEV_LEDS_GPIO 
     
    5764        select MYLOADER 
    5865        select AR71XX_DEV_M25P80 
     66        select AR71XX_DEV_GPIO_BUTTONS 
    5967        select AR71XX_DEV_PB42_PCI if PCI 
    6068        select AR71XX_DEV_LEDS_GPIO 
     
    6573        select AR71XX_DEV_M25P80 
    6674        select AR71XX_DEV_AR913X_WMAC 
     75        select AR71XX_DEV_GPIO_BUTTONS 
    6776        select AR71XX_DEV_LEDS_GPIO 
    6877        default y 
     
    7180        bool "Linksys WRT400N board support" 
    7281        select AR71XX_DEV_M25P80 
     82        select AR71XX_DEV_GPIO_BUTTONS 
    7383        select AR71XX_DEV_LEDS_GPIO 
    7484        default y 
     
    7686config AR71XX_MACH_RB_4XX 
    7787        bool "MikroTik RouterBOARD 4xx series support" 
     88        select AR71XX_DEV_GPIO_BUTTONS 
    7889        select AR71XX_DEV_LEDS_GPIO 
    7990        default y 
     
    8394        select AR71XX_DEV_M25P80 
    8495        select AR71XX_DEV_AP94_PCI if PCI 
     96        select AR71XX_DEV_GPIO_BUTTONS 
    8597        select AR71XX_DEV_LEDS_GPIO 
    8698        default y 
     
    90102        select AR71XX_DEV_M25P80 
    91103        select AR71XX_DEV_AR913X_WMAC 
     104        select AR71XX_DEV_GPIO_BUTTONS 
    92105        select AR71XX_DEV_LEDS_GPIO 
    93106        default y 
     
    97110        select AR71XX_DEV_M25P80 
    98111        select AR71XX_DEV_AR913X_WMAC 
     112        select AR71XX_DEV_GPIO_BUTTONS 
    99113        select AR71XX_DEV_LEDS_GPIO 
    100114        default y 
     
    104118        select AR71XX_DEV_M25P80 
    105119        select AR71XX_DEV_AR913X_WMAC 
     120        select AR71XX_DEV_GPIO_BUTTONS 
    106121        select AR71XX_DEV_LEDS_GPIO 
    107122        default y 
     
    111126        select AR71XX_DEV_M25P80 
    112127        select AR71XX_DEV_AP91_PCI if PCI 
     128        select AR71XX_DEV_GPIO_BUTTONS 
    113129        select AR71XX_DEV_LEDS_GPIO 
    114130        default y 
     
    118134        select AR71XX_DEV_M25P80 
    119135        select AR71XX_DEV_PB42_PCI if PCI 
     136        select AR71XX_DEV_GPIO_BUTTONS 
    120137        select AR71XX_DEV_LEDS_GPIO 
    121138        default y 
     
    125142        select AR71XX_DEV_M25P80 
    126143        select AR71XX_DEV_AR913X_WMAC 
     144        select AR71XX_DEV_GPIO_BUTTONS 
    127145        select AR71XX_DEV_LEDS_GPIO 
    128146        default y 
     
    132150        select AR71XX_DEV_M25P80 
    133151        select AR71XX_DEV_AR913X_WMAC 
     152        select AR71XX_DEV_GPIO_BUTTONS 
    134153        select AR71XX_DEV_LEDS_GPIO 
    135154        default y 
     
    139158        select AR71XX_DEV_M25P80 
    140159        select AR71XX_DEV_AR913X_WMAC 
     160        select AR71XX_DEV_GPIO_BUTTONS 
    141161        select AR71XX_DEV_LEDS_GPIO 
    142162        default y 
     
    146166        select AR71XX_DEV_M25P80 
    147167        select AR71XX_DEV_AP91_PCI if PCI 
     168        select AR71XX_DEV_GPIO_BUTTONS 
    148169        select AR71XX_DEV_LEDS_GPIO 
    149170        select AR71XX_DEV_PB42_PCI if PCI 
     
    164185        def_bool n 
    165186 
     187config AR71XX_DEV_GPIO_BUTTONS 
     188        def_bool n 
     189 
    166190config AR71XX_DEV_LEDS_GPIO 
    167191        def_bool n 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile

    r18936 r18937  
    1717obj-$(CONFIG_AR71XX_DEV_AP94_PCI)       += dev-ap94-pci.o 
    1818obj-$(CONFIG_AR71XX_DEV_AR913X_WMAC)    += dev-ar913x-wmac.o 
     19obj-$(CONFIG_AR71XX_DEV_GPIO_BUTTONS)   += dev-gpio-buttons.o 
    1920obj-$(CONFIG_AR71XX_DEV_LEDS_GPIO)      += dev-leds-gpio.o 
    2021obj-$(CONFIG_AR71XX_DEV_M25P80)         += dev-m25p80.o 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c

    r18936 r18937  
    666666} 
    667667 
    668 void __init ar71xx_add_device_gpio_buttons(int id, 
    669                                            unsigned poll_interval, 
    670                                            unsigned nbuttons, 
    671                                            struct gpio_button *buttons) 
    672 { 
    673         struct platform_device *pdev; 
    674         struct gpio_buttons_platform_data pdata; 
    675         struct gpio_button *p; 
    676         int err; 
    677  
    678         p = kmalloc(nbuttons * sizeof(*p), GFP_KERNEL); 
    679         if (!p) 
    680                 return; 
    681  
    682         memcpy(p, buttons, nbuttons * sizeof(*p)); 
    683  
    684         pdev = platform_device_alloc("gpio-buttons", id); 
    685         if (!pdev) 
    686                 goto err_free_buttons; 
    687  
    688         memset(&pdata, 0, sizeof(pdata)); 
    689         pdata.poll_interval = poll_interval; 
    690         pdata.nbuttons = nbuttons; 
    691         pdata.buttons = p; 
    692  
    693         err = platform_device_add_data(pdev, &pdata, sizeof(pdata)); 
    694         if (err) 
    695                 goto err_put_pdev; 
    696  
    697  
    698         err = platform_device_add(pdev); 
    699         if (err) 
    700                 goto err_put_pdev; 
    701  
    702         return; 
    703  
    704 err_put_pdev: 
    705         platform_device_put(pdev); 
    706  
    707 err_free_buttons: 
    708         kfree(p); 
    709 } 
    710  
    711668void __init ar71xx_add_device_wdt(void) 
    712669{ 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/devices.h

    r18936 r18937  
    1515#include <asm/mach-ar71xx/platform.h> 
    1616 
    17 #include <linux/gpio_buttons.h> 
    1817#include <net/dsa.h> 
    1918 
     
    4039void ar71xx_add_device_mdio(u32 phy_mask) __init; 
    4140 
    42 void ar71xx_add_device_gpio_buttons(int id, 
    43                                     unsigned poll_interval, 
    44                                     unsigned nbuttons, 
    45                                     struct gpio_button *buttons) __init; 
    46  
    4741void ar71xx_add_device_usb(void) __init; 
    4842void ar71xx_add_device_uart(void) __init; 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c

    r18936 r18937  
    1313#include <linux/mtd/mtd.h> 
    1414#include <linux/mtd/partitions.h> 
    15 #include <linux/input.h> 
    1615 
    1716#include <asm/mips_machine.h> 
     
    2120#include "dev-m25p80.h" 
    2221#include "dev-ar913x-wmac.h" 
     22#include "dev-gpio-buttons.h" 
    2323#include "dev-leds-gpio.h" 
    2424 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c

    r18936 r18937  
    1212#include <linux/delay.h> 
    1313#include <linux/platform_device.h> 
    14 #include <linux/input.h> 
    1514#include <linux/mtd/mtd.h> 
    1615#include <linux/mtd/partitions.h> 
     
    2524#include "devices.h" 
    2625#include "dev-ar913x-wmac.h" 
     26#include "dev-gpio-buttons.h" 
    2727#include "dev-leds-gpio.h" 
    2828 
     
    3737#define AP83_050_GPIO_VSC7385_MOSI      16 
    3838#define AP83_050_GPIO_VSC7385_SCK       17 
     39 
     40#define AP83_BUTTONS_POLL_INTERVAL      20 
    3941 
    4042#ifdef CONFIG_MTD_PARTITIONS 
     
    215217                                        ap83_leds_gpio); 
    216218 
    217         ar71xx_add_device_gpio_buttons(-1, 20, ARRAY_SIZE(ap83_gpio_buttons), 
     219        ar71xx_add_device_gpio_buttons(-1, AP83_BUTTONS_POLL_INTERVAL, 
     220                                        ARRAY_SIZE(ap83_gpio_buttons), 
    218221                                        ap83_gpio_buttons); 
    219222 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c

    r18936 r18937  
    1313#include <linux/mtd/mtd.h> 
    1414#include <linux/mtd/partitions.h> 
    15 #include <linux/input.h> 
    1615 
    1716#include <asm/mips_machine.h> 
     
    2019#include "devices.h" 
    2120#include "dev-m25p80.h" 
     21#include "dev-gpio-buttons.h" 
    2222#include "dev-pb42-pci.h" 
    2323#include "dev-leds-gpio.h" 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c

    r18936 r18937  
    1313#include <linux/mtd/mtd.h> 
    1414#include <linux/mtd/partitions.h> 
    15 #include <linux/input.h> 
    1615 
    1716#include <asm/mips_machine.h> 
     
    2120#include "dev-m25p80.h" 
    2221#include "dev-ar913x-wmac.h" 
     22#include "dev-gpio-buttons.h" 
    2323#include "dev-leds-gpio.h" 
    2424 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c

    r18936 r18937  
    1414#include <linux/mtd/mtd.h> 
    1515#include <linux/mtd/partitions.h> 
    16 #include <linux/input.h> 
    1716#include <linux/delay.h> 
    1817#include <linux/rtl8366_smi.h> 
     
    2423#include "dev-m25p80.h" 
    2524#include "dev-ap94-pci.h" 
     25#include "dev-gpio-buttons.h" 
    2626#include "dev-leds-gpio.h" 
    2727 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c

    r18936 r18937  
    1414#include <linux/spi/spi.h> 
    1515#include <linux/spi/flash.h> 
    16 #include <linux/input.h> 
    1716 
    1817#include <asm/mips_machine.h> 
     
    2120#include "devices.h" 
    2221#include "dev-ar913x-wmac.h" 
     22#include "dev-gpio-buttons.h" 
    2323#include "dev-leds-gpio.h" 
    2424 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c

    r18936 r18937  
    1313#include <linux/mtd/mtd.h> 
    1414#include <linux/mtd/partitions.h> 
    15 #include <linux/input.h> 
    1615 
    1716#include <asm/mips_machine.h> 
     
    2120#include "dev-m25p80.h" 
    2221#include "dev-ar913x-wmac.h" 
     22#include "dev-gpio-buttons.h" 
    2323#include "dev-leds-gpio.h" 
    2424 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c

    r18932 r18937  
    1212#include <linux/init.h> 
    1313#include <linux/bitops.h> 
    14 #include <linux/input.h> 
    1514#include <linux/platform_device.h> 
    1615 
     
    2019#include "devices.h" 
    2120#include "dev-m25p80.h" 
     21#include "dev-gpio-buttons.h" 
    2222#include "dev-pb42-pci.h" 
    2323 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c

    r18936 r18937  
    1111#include <linux/init.h> 
    1212#include <linux/bitops.h> 
    13 #include <linux/input.h> 
    1413#include <linux/delay.h> 
    1514#include <linux/platform_device.h> 
     
    2625#include "devices.h" 
    2726#include "dev-pb42-pci.h" 
     27#include "dev-gpio-buttons.h" 
    2828#include "dev-leds-gpio.h" 
    2929 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb-4xx.c

    r18936 r18937  
    1616#include <linux/spi/flash.h> 
    1717#include <linux/spi/mmc_spi.h> 
    18 #include <linux/input.h> 
    1918 
    2019#include <asm/mips_machine.h> 
     
    2322 
    2423#include "devices.h" 
     24#include "dev-gpio-buttons.h" 
    2525#include "dev-leds-gpio.h" 
    2626 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c

    r18936 r18937  
    1313#include <linux/mtd/mtd.h> 
    1414#include <linux/mtd/partitions.h> 
    15 #include <linux/input.h> 
    1615 
    1716#include <asm/mips_machine.h> 
     
    2120#include "dev-m25p80.h" 
    2221#include "dev-ar913x-wmac.h" 
     22#include "dev-gpio-buttons.h" 
    2323#include "dev-leds-gpio.h" 
    2424 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c

    r18936 r18937  
    1212#include <linux/mtd/mtd.h> 
    1313#include <linux/mtd/partitions.h> 
    14 #include <linux/input.h> 
    1514 
    1615#include <asm/mips_machine.h> 
    17  
    1816#include <asm/mach-ar71xx/ar71xx.h> 
    1917 
     
    2119#include "dev-m25p80.h" 
    2220#include "dev-ar913x-wmac.h" 
     21#include "dev-gpio-buttons.h" 
    2322#include "dev-leds-gpio.h" 
    2423 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c

    r18936 r18937  
    1212#include <linux/mtd/mtd.h> 
    1313#include <linux/mtd/partitions.h> 
    14 #include <linux/input.h> 
    1514 
    1615#include <asm/mips_machine.h> 
    17  
    1816#include <asm/mach-ar71xx/ar71xx.h> 
    1917 
     
    2119#include "dev-m25p80.h" 
    2220#include "dev-ap91-pci.h" 
     21#include "dev-gpio-buttons.h" 
    2322#include "dev-leds-gpio.h" 
    2423 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c

    r18936 r18937  
    1212#include <linux/mtd/mtd.h> 
    1313#include <linux/mtd/partitions.h> 
    14 #include <linux/input.h> 
    1514 
    1615#include <asm/mips_machine.h> 
     
    1918#include "devices.h" 
    2019#include "dev-m25p80.h" 
     20#include "dev-gpio-buttons.h" 
    2121#include "dev-pb42-pci.h" 
    2222#include "dev-leds-gpio.h" 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c

    r18936 r18937  
    1212#include <linux/mtd/mtd.h> 
    1313#include <linux/mtd/partitions.h> 
    14 #include <linux/input.h> 
    1514 
    1615#include <asm/mips_machine.h> 
     
    2019#include "dev-m25p80.h" 
    2120#include "dev-ar913x-wmac.h" 
     21#include "dev-gpio-buttons.h" 
    2222#include "dev-leds-gpio.h" 
    2323 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c

    r18936 r18937  
    1313#include <linux/pci.h> 
    1414#include <linux/platform_device.h> 
    15 #include <linux/input.h> 
    1615 
    1716#include <asm/mips_machine.h> 
     
    2120#include "dev-m25p80.h" 
    2221#include "dev-ap91-pci.h" 
     22#include "dev-gpio-buttons.h" 
    2323#include "dev-pb42-pci.h" 
    2424#include "dev-leds-gpio.h" 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c

    r18936 r18937  
    1313#include <linux/mtd/mtd.h> 
    1414#include <linux/mtd/partitions.h> 
    15 #include <linux/input.h> 
    1615#include <linux/delay.h> 
    1716#include <linux/rtl8366_smi.h> 
     
    2322#include "dev-m25p80.h" 
    2423#include "dev-ap94-pci.h" 
     24#include "dev-gpio-buttons.h" 
    2525#include "dev-leds-gpio.h" 
    2626 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c

    r18936 r18937  
    1414#include <linux/mtd/mtd.h> 
    1515#include <linux/mtd/partitions.h> 
    16 #include <linux/input.h> 
    1716 
    1817#include <asm/mips_machine.h> 
    19  
    2018#include <asm/mach-ar71xx/ar71xx.h> 
    2119 
     
    2321#include "dev-m25p80.h" 
    2422#include "dev-ar913x-wmac.h" 
     23#include "dev-gpio-buttons.h" 
    2524#include "dev-leds-gpio.h" 
    2625 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c

    r18936 r18937  
    1313#include <linux/mtd/mtd.h> 
    1414#include <linux/mtd/partitions.h> 
    15 #include <linux/input.h> 
    1615 
    1716#include <asm/mips_machine.h> 
     
    2221#include "dev-m25p80.h" 
    2322#include "dev-pb42-pci.h" 
     23#include "dev-gpio-buttons.h" 
    2424#include "dev-leds-gpio.h" 
    2525 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c

    r18936 r18937  
    1212#include <linux/mtd/mtd.h> 
    1313#include <linux/mtd/partitions.h> 
    14 #include <linux/input.h> 
    1514 
    1615#include <asm/mips_machine.h> 
     
    2019#include "dev-m25p80.h" 
    2120#include "dev-ar913x-wmac.h" 
     21#include "dev-gpio-buttons.h" 
    2222#include "dev-leds-gpio.h" 
    2323 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c

    r18936 r18937  
    1313#include <linux/mtd/mtd.h> 
    1414#include <linux/mtd/partitions.h> 
    15 #include <linux/input.h> 
    1615 
    1716#include <asm/mips_machine.h> 
     
    2019#include "devices.h" 
    2120#include "dev-m25p80.h" 
     21#include "dev-gpio-buttons.h" 
     22#include "dev-gpio-buttons.h" 
    2223#include "dev-leds-gpio.h" 
    2324 
Note: See TracChangeset for help on using the changeset viewer.