summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-12-26 14:18:54 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-12-26 14:18:54 +0000
commit3687b4fb2693e54e6d476d4fe0a736e75eeee2c7 (patch)
tree07d42d979cdc6a6d89d03c7708f32aac6fe9370b /target/linux
parentf1e9fb687b8ec20e4be60fdb8ab19f0622f8677b (diff)
downloadmtk-20170518-3687b4fb2693e54e6d476d4fe0a736e75eeee2c7.zip
mtk-20170518-3687b4fb2693e54e6d476d4fe0a736e75eeee2c7.tar.gz
mtk-20170518-3687b4fb2693e54e6d476d4fe0a736e75eeee2c7.tar.bz2
ar71xx: move leds-gpio device support into a spearate file
SVN-Revision: 18936
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/config-2.6.301
-rw-r--r--target/linux/ar71xx/config-2.6.311
-rw-r--r--target/linux/ar71xx/config-2.6.321
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig23
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/Makefile1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/dev-leds-gpio.c56
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/dev-leds-gpio.h21
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/devices.c39
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/devices.h5
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb-4xx.c1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c1
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c1
29 files changed, 124 insertions, 48 deletions
diff --git a/target/linux/ar71xx/config-2.6.30 b/target/linux/ar71xx/config-2.6.30
index 84aa232..1c01155 100644
--- a/target/linux/ar71xx/config-2.6.30
+++ b/target/linux/ar71xx/config-2.6.30
@@ -6,6 +6,7 @@ CONFIG_AG71XX_AR8216_SUPPORT=y
CONFIG_AR71XX_DEV_AP91_PCI=y
CONFIG_AR71XX_DEV_AP94_PCI=y
CONFIG_AR71XX_DEV_AR913X_WMAC=y
+CONFIG_AR71XX_DEV_LEDS_GPIO=y
CONFIG_AR71XX_DEV_M25P80=y
CONFIG_AR71XX_DEV_PB42_PCI=y
CONFIG_AR71XX_MACH_AP81=y
diff --git a/target/linux/ar71xx/config-2.6.31 b/target/linux/ar71xx/config-2.6.31
index 3b2af9c..5b6bb57 100644
--- a/target/linux/ar71xx/config-2.6.31
+++ b/target/linux/ar71xx/config-2.6.31
@@ -8,6 +8,7 @@ CONFIG_AG71XX_AR8216_SUPPORT=y
CONFIG_AR71XX_DEV_AP91_PCI=y
CONFIG_AR71XX_DEV_AP94_PCI=y
CONFIG_AR71XX_DEV_AR913X_WMAC=y
+CONFIG_AR71XX_DEV_LEDS_GPIO=y
CONFIG_AR71XX_DEV_M25P80=y
CONFIG_AR71XX_DEV_PB42_PCI=y
CONFIG_AR71XX_MACH_AP81=y
diff --git a/target/linux/ar71xx/config-2.6.32 b/target/linux/ar71xx/config-2.6.32
index 566495f..1b6b3b0 100644
--- a/target/linux/ar71xx/config-2.6.32
+++ b/target/linux/ar71xx/config-2.6.32
@@ -8,6 +8,7 @@ CONFIG_AG71XX_AR8216_SUPPORT=y
CONFIG_AR71XX_DEV_AP91_PCI=y
CONFIG_AR71XX_DEV_AP94_PCI=y
CONFIG_AR71XX_DEV_AR913X_WMAC=y
+CONFIG_AR71XX_DEV_LEDS_GPIO=y
CONFIG_AR71XX_DEV_M25P80=y
CONFIG_AR71XX_DEV_PB42_PCI=y
CONFIG_AR71XX_MACH_AP81=y
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig b/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
index d1ff1be..08d0397 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
@@ -6,23 +6,27 @@ config AR71XX_MACH_AP81
bool "Atheros AP81 board support"
select AR71XX_DEV_M25P80
select AR71XX_DEV_AR913X_WMAC
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_AP83
bool "Atheros AP83 board support"
select AR71XX_DEV_AR913X_WMAC
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_DIR_615_C1
bool "D-Link DIR-615 rev. C1 support"
select AR71XX_DEV_M25P80
select AR71XX_DEV_AR913X_WMAC
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_DIR_825_B1
bool "D-Link DIR-825 rev. B1 board support"
select AR71XX_DEV_M25P80
select AR71XX_DEV_AP94_PCI if PCI
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_PB42
@@ -34,12 +38,14 @@ config AR71XX_MACH_PB42
config AR71XX_MACH_PB44
bool "Atheros PB44 board support"
select AR71XX_DEV_PB42_PCI if PCI
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_AW_NR580
bool "AzureWave AW-NR580 board support"
select AR71XX_DEV_M25P80
select AR71XX_DEV_PB42_PCI if PCI
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_GENERIC
@@ -51,81 +57,95 @@ config AR71XX_MACH_WP543
select MYLOADER
select AR71XX_DEV_M25P80
select AR71XX_DEV_PB42_PCI if PCI
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_WRT160NL
bool "Linksys WRT160NL board support"
select AR71XX_DEV_M25P80
select AR71XX_DEV_AR913X_WMAC
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_WRT400N
bool "Linksys WRT400N board support"
select AR71XX_DEV_M25P80
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_RB_4XX
bool "MikroTik RouterBOARD 4xx series support"
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_WNDR3700
bool "NETGEAR WNDR3700 board support"
select AR71XX_DEV_M25P80
select AR71XX_DEV_AP94_PCI if PCI
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_WNR2000
bool "NETGEAR WNR2000 board support"
select AR71XX_DEV_M25P80
select AR71XX_DEV_AR913X_WMAC
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_MZK_W04NU
bool "Planex MZK-W04NU board support"
select AR71XX_DEV_M25P80
select AR71XX_DEV_AR913X_WMAC
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_MZK_W300NH
bool "Planex MZK-W300NH board support"
select AR71XX_DEV_M25P80
select AR71XX_DEV_AR913X_WMAC
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_TL_WR741ND
bool "TP-LINK TL-WR741ND support"
select AR71XX_DEV_M25P80
select AR71XX_DEV_AP91_PCI if PCI
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_TL_WR841N_V1
bool "TP-LINK TL-WR841N v1 support"
select AR71XX_DEV_M25P80
select AR71XX_DEV_PB42_PCI if PCI
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_TL_WR941ND
bool "TP-LINK TL-WR941ND support"
select AR71XX_DEV_M25P80
select AR71XX_DEV_AR913X_WMAC
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_TL_WR1043ND
bool "TP-LINK TL-WR1043ND support"
select AR71XX_DEV_M25P80
select AR71XX_DEV_AR913X_WMAC
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_TEW_632BRP
bool "TRENDnet TEW-632BRP support"
select AR71XX_DEV_M25P80
select AR71XX_DEV_AR913X_WMAC
+ select AR71XX_DEV_LEDS_GPIO
default y
config AR71XX_MACH_UBNT
bool "Ubiquiti AR71xx based boards support"
select AR71XX_DEV_M25P80
select AR71XX_DEV_AP91_PCI if PCI
+ select AR71XX_DEV_LEDS_GPIO
select AR71XX_DEV_PB42_PCI if PCI
default y
@@ -143,6 +163,9 @@ config AR71XX_DEV_AP94_PCI
config AR71XX_DEV_AR913X_WMAC
def_bool n
+config AR71XX_DEV_LEDS_GPIO
+ def_bool n
+
config AR71XX_DEV_PB42_PCI
def_bool n
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile b/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
index fed466d..fee95bd 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
@@ -16,6 +16,7 @@ obj-$(CONFIG_PCI) += pci.o
obj-$(CONFIG_AR71XX_DEV_AP91_PCI) += dev-ap91-pci.o
obj-$(CONFIG_AR71XX_DEV_AP94_PCI) += dev-ap94-pci.o
obj-$(CONFIG_AR71XX_DEV_AR913X_WMAC) += dev-ar913x-wmac.o
+obj-$(CONFIG_AR71XX_DEV_LEDS_GPIO) += dev-leds-gpio.o
obj-$(CONFIG_AR71XX_DEV_M25P80) += dev-m25p80.o
obj-$(CONFIG_AR71XX_DEV_PB42_PCI) += dev-pb42-pci.o
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-leds-gpio.c b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-leds-gpio.c
new file mode 100644
index 0000000..7066ddc
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-leds-gpio.c
@@ -0,0 +1,56 @@
+/*
+ * Atheros AR71xx GPIO LED device support
+ *
+ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
+ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
+ *
+ * Parts of this file are based on Atheros' 2.6.15 BSP
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/platform_device.h>
+
+#include "dev-leds-gpio.h"
+
+void __init ar71xx_add_device_leds_gpio(int id, unsigned num_leds,
+ struct gpio_led *leds)
+{
+ struct platform_device *pdev;
+ struct gpio_led_platform_data pdata;
+ struct gpio_led *p;
+ int err;
+
+ p = kmalloc(num_leds * sizeof(*p), GFP_KERNEL);
+ if (!p)
+ return;
+
+ memcpy(p, leds, num_leds * sizeof(*p));
+
+ pdev = platform_device_alloc("leds-gpio", id);
+ if (!pdev)
+ goto err_free_leds;
+
+ memset(&pdata, 0, sizeof(pdata));
+ pdata.num_leds = num_leds;
+ pdata.leds = p;
+
+ err = platform_device_add_data(pdev, &pdata, sizeof(pdata));
+ if (err)
+ goto err_put_pdev;
+
+ err = platform_device_add(pdev);
+ if (err)
+ goto err_put_pdev;
+
+ return;
+
+err_put_pdev:
+ platform_device_put(pdev);
+
+err_free_leds:
+ kfree(p);
+}
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-leds-gpio.h b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-leds-gpio.h
new file mode 100644
index 0000000..ab4a89d
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-leds-gpio.h
@@ -0,0 +1,21 @@
+/*
+ * Atheros AR71xx GPIO LED device support
+ *
+ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
+ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#ifndef _AR71XX_DEV_LEDS_GPIO_H
+#define _AR71XX_DEV_LEDS_GPIO_H
+
+#include <linux/leds.h>
+
+void ar71xx_add_device_leds_gpio(int id,
+ unsigned num_leds,
+ struct gpio_led *leds) __init;
+
+#endif /* _AR71XX_DEV_LEDS_GPIO_H */
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c b/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c
index 6f6ec42..e2e08bb 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c
@@ -665,45 +665,6 @@ void __init ar71xx_add_device_spi(struct ar71xx_spi_platform_data *pdata,
platform_device_register(&ar71xx_spi_device);
}
-void __init ar71xx_add_device_leds_gpio(int id, unsigned num_leds,
- struct gpio_led *leds)
-{
- struct platform_device *pdev;
- struct gpio_led_platform_data pdata;
- struct gpio_led *p;
- int err;
-
- p = kmalloc(num_leds * sizeof(*p), GFP_KERNEL);
- if (!p)
- return;
-
- memcpy(p, leds, num_leds * sizeof(*p));
-
- pdev = platform_device_alloc("leds-gpio", id);
- if (!pdev)
- goto err_free_leds;
-
- memset(&pdata, 0, sizeof(pdata));
- pdata.num_leds = num_leds;
- pdata.leds = p;
-
- err = platform_device_add_data(pdev, &pdata, sizeof(pdata));
- if (err)
- goto err_put_pdev;
-
- err = platform_device_add(pdev);
- if (err)
- goto err_put_pdev;
-
- return;
-
-err_put_pdev:
- platform_device_put(pdev);
-
-err_free_leds:
- kfree(p);
-}
-
void __init ar71xx_add_device_gpio_buttons(int id,
unsigned poll_interval,
unsigned nbuttons,
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/devices.h b/target/linux/ar71xx/files/arch/mips/ar71xx/devices.h
index 1408629..3e4eaeb 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/devices.h
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/devices.h
@@ -14,7 +14,6 @@
#include <asm/mach-ar71xx/platform.h>
-#include <linux/leds.h>
#include <linux/gpio_buttons.h>
#include <net/dsa.h>
@@ -40,10 +39,6 @@ void ar71xx_add_device_eth(unsigned int id) __init;
void ar71xx_add_device_mdio(u32 phy_mask) __init;
-void ar71xx_add_device_leds_gpio(int id,
- unsigned num_leds,
- struct gpio_led *leds) __init;
-
void ar71xx_add_device_gpio_buttons(int id,
unsigned poll_interval,
unsigned nbuttons,
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c
index 7f3a6c9..0b234cd 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c
@@ -20,6 +20,7 @@
#include "devices.h"
#include "dev-m25p80.h"
#include "dev-ar913x-wmac.h"
+#include "dev-leds-gpio.h"
#define AP81_GPIO_LED_STATUS 1
#define AP81_GPIO_LED_AOSS 3
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c
index cb7e1d2..a9bb2bf 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c
@@ -24,6 +24,7 @@
#include "devices.h"
#include "dev-ar913x-wmac.h"
+#include "dev-leds-gpio.h"
#define AP83_GPIO_LED_WLAN 6
#define AP83_GPIO_LED_POWER 14
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c
index 859bcae..9e17e3f 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c
@@ -20,6 +20,7 @@
#include "devices.h"
#include "dev-m25p80.h"
#include "dev-pb42-pci.h"
+#include "dev-leds-gpio.h"
#define AW_NR580_GPIO_LED_READY_RED 0
#define AW_NR580_GPIO_LED_WLAN 1
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c
index e5ce035..d9bd285 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c
@@ -15,12 +15,12 @@
#include <linux/input.h>
#include <asm/mips_machine.h>
-
#include <asm/mach-ar71xx/ar71xx.h>
#include "devices.h"
#include "dev-m25p80.h"
#include "dev-ar913x-wmac.h"
+#include "dev-leds-gpio.h"
#define DIR_615C1_GPIO_LED_ORANGE_STATUS 1 /* ORANGE:STATUS:TRICOLOR */
#define DIR_615C1_GPIO_LED_BLUE_WPS 3 /* BLUE:WPS */
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c
index 5f9f067..7321071 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c
@@ -23,6 +23,7 @@
#include "devices.h"
#include "dev-m25p80.h"
#include "dev-ap94-pci.h"
+#include "dev-leds-gpio.h"
#define DIR825B1_GPIO_LED_BLUE_USB 0
#define DIR825B1_GPIO_LED_ORANGE_POWER 1
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c
index 71b72a6..7e8f0b5 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c
@@ -16,11 +16,11 @@
#include <linux/input.h>
#include <asm/mips_machine.h>
-
#include <asm/mach-ar71xx/ar71xx.h>
#include "devices.h"
#include "dev-ar913x-wmac.h"
+#include "dev-leds-gpio.h"
#define MZK_W04NU_GPIO_LED_USB 0
#define MZK_W04NU_GPIO_LED_STATUS 1
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c
index 4cf5fc3..24b05b3 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c
@@ -15,12 +15,12 @@
#include <linux/input.h>
#include <asm/mips_machine.h>
-
#include <asm/mach-ar71xx/ar71xx.h>
#include "devices.h"
#include "dev-m25p80.h"
#include "dev-ar913x-wmac.h"
+#include "dev-leds-gpio.h"
#define MZK_W300NH_GPIO_LED_STATUS 1
#define MZK_W300NH_GPIO_LED_WPS 3
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c
index 008babc..c8a0c6d 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c
@@ -25,6 +25,7 @@
#include "devices.h"
#include "dev-pb42-pci.h"
+#include "dev-leds-gpio.h"
#define PB44_PCF8757_VSC7395_CS 0
#define PB44_PCF8757_STEREO_CS 1
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb-4xx.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb-4xx.c
index a8e97c3..69e25ce 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb-4xx.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb-4xx.c
@@ -22,6 +22,7 @@
#include <asm/mach-ar71xx/pci.h>
#include "devices.h"
+#include "dev-leds-gpio.h"
#define RB4XX_GPIO_USER_LED 4
#define RB4XX_GPIO_RESET_SWITCH 7
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c
index 340f35d..fd8f67a 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c
@@ -20,6 +20,7 @@
#include "devices.h"
#include "dev-m25p80.h"
#include "dev-ar913x-wmac.h"
+#include "dev-leds-gpio.h"
#define TEW_632BRP_GPIO_LED_STATUS 1
#define TEW_632BRP_GPIO_LED_WPS 3
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c
index b08383d..1dc61c7 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c
@@ -20,6 +20,7 @@
#include "devices.h"
#include "dev-m25p80.h"
#include "dev-ar913x-wmac.h"
+#include "dev-leds-gpio.h"
#define TL_WR1043ND_GPIO_LED_USB 1
#define TL_WR1043ND_GPIO_LED_SYSTEM 2
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c
index e3abf1e..4273f2a 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c
@@ -20,6 +20,7 @@
#include "devices.h"
#include "dev-m25p80.h"
#include "dev-ap91-pci.h"
+#include "dev-leds-gpio.h"
#define TL_WR741ND_GPIO_LED_QSS 0
#define TL_WR741ND_GPIO_LED_SYSTEM 1
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c
index 9baedaa..459cfa5 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c
@@ -19,6 +19,7 @@
#include "devices.h"
#include "dev-m25p80.h"
#include "dev-pb42-pci.h"
+#include "dev-leds-gpio.h"
#define TL_WR841ND_V1_GPIO_LED_SYSTEM 2
#define TL_WR841ND_V1_GPIO_LED_QSS_GREEN 4
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c
index cd5ca92..4bd4a9a 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c
@@ -14,12 +14,12 @@
#include <linux/input.h>
#include <asm/mips_machine.h>
-
#include <asm/mach-ar71xx/ar71xx.h>
#include "devices.h"
#include "dev-m25p80.h"
#include "dev-ar913x-wmac.h"
+#include "dev-leds-gpio.h"
#define TL_WR941ND_GPIO_LED_SYSTEM 2
#define TL_WR941ND_GPIO_LED_QSS 5
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
index e3285cf..d83b283 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
@@ -21,6 +21,7 @@
#include "dev-m25p80.h"
#include "dev-ap91-pci.h"
#include "dev-pb42-pci.h"
+#include "dev-leds-gpio.h"
#define UBNT_RS_GPIO_LED_RF 2
#define UBNT_RS_GPIO_SW4 8
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c
index 3216ede..e50235b 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c
@@ -22,6 +22,7 @@
#include "devices.h"
#include "dev-m25p80.h"
#include "dev-ap94-pci.h"
+#include "dev-leds-gpio.h"
#define WNDR3700_GPIO_LED_WPS_ORANGE 0
#define WNDR3700_GPIO_LED_POWER_ORANGE 1
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c
index 4ea6158..73e8982 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c
@@ -22,6 +22,7 @@
#include "devices.h"
#include "dev-m25p80.h"
#include "dev-ar913x-wmac.h"
+#include "dev-leds-gpio.h"
#define WNR2000_GPIO_LED_PWR_GREEN 14
#define WNR2000_GPIO_LED_PWR_AMBER 7
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c
index 2830dcd..15e4278 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c
@@ -21,6 +21,7 @@
#include "devices.h"
#include "dev-m25p80.h"
#include "dev-pb42-pci.h"
+#include "dev-leds-gpio.h"
#define WP543_GPIO_SW6 2
#define WP543_GPIO_LED_1 3
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c
index 24704aa..571fe1d 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c
@@ -19,6 +19,7 @@
#include "devices.h"
#include "dev-m25p80.h"
#include "dev-ar913x-wmac.h"
+#include "dev-leds-gpio.h"
#define WRT160NL_GPIO_LED_POWER 14
#define WRT160NL_GPIO_LED_WPS_AMBER 9
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c
index 91de9ad..bd6fdb2 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c
@@ -19,6 +19,7 @@
#include "devices.h"
#include "dev-m25p80.h"
+#include "dev-leds-gpio.h"
#define WRT400N_GPIO_LED_ORANGE 5
#define WRT400N_GPIO_LED_GREEN 4