ar71xx: Add support for D-Link DAP-1330 a1
[openwrt/openwrt.git] / target / linux / ar71xx / files / arch / mips / ath79 / dev-ap9x-pci.c
index bf80d4d0308f8de43291b771d71b48288bb0259f..483aed78edeae6e53136ba2a15ca67c59ba554db 100644 (file)
@@ -39,18 +39,6 @@ __init void ap9x_pci_setup_wmac_led_pin(unsigned wmac, int pin)
        }
 }
 
-__init void ap9x_pci_setup_wmac_led_name(unsigned wmac, const char *led_name)
-{
-       switch (wmac) {
-       case 0:
-               ap9x_wmac0_data.led_name = led_name;
-               break;
-       case 1:
-               ap9x_wmac1_data.led_name = led_name;
-               break;
-       }
-}
-
 __init struct ath9k_platform_data *ap9x_pci_get_wmac_data(unsigned wmac)
 {
        switch (wmac) {
@@ -93,6 +81,20 @@ __init void ap9x_pci_setup_wmac_leds(unsigned wmac, struct gpio_led *leds,
        }
 }
 
+__init void ap9x_pci_setup_wmac_btns(unsigned wmac,
+                                    struct gpio_keys_button *btns,
+                                    unsigned num_btns, unsigned poll_interval)
+{
+       struct ath9k_platform_data *ap9x_wmac_data;
+
+       if (!(ap9x_wmac_data = ap9x_pci_get_wmac_data(wmac)))
+               return;
+
+       ap9x_wmac_data->btns = btns;
+       ap9x_wmac_data->num_btns = num_btns;
+       ap9x_wmac_data->btn_poll_interval = poll_interval;
+}
+
 static int ap91_pci_plat_dev_init(struct pci_dev *dev)
 {
        switch (PCI_SLOT(dev->devfn)) {