backfire: ar71xx: add helper function to setup LED pin and GPIO on the AP91 based...
[openwrt-10.03/.git] / target / linux / ar71xx / files / arch / mips / ar71xx / dev-ap91-pci.c
index e81a01aba764ce65c0b7f26483379e581230c1f6..912a0e4d965c0491ad084f3110bc3d237788e783 100644 (file)
@@ -17,7 +17,9 @@
 
 #include "dev-ap91-pci.h"
 
-static struct ath9k_platform_data ap91_wmac_data;
+static struct ath9k_platform_data ap91_wmac_data = {
+       .led_pin = -1,
+};
 static char ap91_wmac_mac[6];
 static int ap91_pci_fixup_enabled;
 
@@ -96,6 +98,17 @@ static void ap91_pci_fixup(struct pci_dev *dev)
 }
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ap91_pci_fixup);
 
+__init void ap91_pci_setup_wmac_led_pin(int pin)
+{
+       ap91_wmac_data.led_pin = pin;
+}
+
+__init void ap91_pci_setup_wmac_gpio(u32 mask, u32 val)
+{
+       ap91_wmac_data.gpio_mask = mask;
+       ap91_wmac_data.gpio_val = val;
+}
+
 void __init ap91_pci_init(u8 *cal_data, u8 *mac_addr)
 {
        if (cal_data)