The NU801 PWM LED driver is used on more than just the ar71xx architecture, so the driver should be moved to generic to support any future platforms or devices.
Signed-off-by: Chris Blake <[email protected]> --- package/kernel/linux/modules/leds.mk | 15 +++++++++++++++ target/linux/ar71xx/modules.mk | 15 --------------- .../{ar71xx => generic}/files/drivers/leds/leds-nu801.c | 0 .../patches-4.1/834-led-nu801.patch} | 14 +++++++------- .../patches-4.4/835-led-nu801.patch} | 14 +++++++------- 5 files changed, 29 insertions(+), 29 deletions(-) rename target/linux/{ar71xx => generic}/files/drivers/leds/leds-nu801.c (100%) rename target/linux/{ar71xx/patches-4.1/818-MIPS-ath79-add-nu801-led-driver.patch => generic/patches-4.1/834-led-nu801.patch} (78%) rename target/linux/{ar71xx/patches-4.4/818-MIPS-ath79-add-nu801-led-driver.patch => generic/patches-4.4/835-led-nu801.patch} (78%) diff --git a/package/kernel/linux/modules/leds.mk b/package/kernel/linux/modules/leds.mk index c4261d3..f156bf2 100644 --- a/package/kernel/linux/modules/leds.mk +++ b/package/kernel/linux/modules/leds.mk @@ -22,6 +22,21 @@ endef $(eval $(call KernelPackage,leds-gpio)) +define KernelPackage/leds-nu801 + SUBMENU:=$(LEDS_MENU) + TITLE:=NU801 LED support + DEPENDS:= @GPIO_SUPPORT + KCONFIG:=CONFIG_LEDS_NU801 + FILES:=$(LINUX_DIR)/drivers/leds/leds-nu801.ko + AUTOLOAD:=$(call AutoLoad,60,leds-nu801) +endef + +define KernelPackage/leds-nu801/description + Kernel module for the nu801 LED driver used on Cisco Meraki hardware. +endef + +$(eval $(call KernelPackage,leds-nu801)) + LED_TRIGGER_DIR=$(LINUX_DIR)/drivers/leds/trigger define KernelPackage/ledtrig-heartbeat diff --git a/target/linux/ar71xx/modules.mk b/target/linux/ar71xx/modules.mk index 9ead8b4..d264aa0 100644 --- a/target/linux/ar71xx/modules.mk +++ b/target/linux/ar71xx/modules.mk @@ -5,21 +5,6 @@ # See /LICENSE for more information. # -define KernelPackage/leds-nu801 - SUBMENU:=$(LEDS_MENU) - TITLE:=Meraki MR18 LED support - DEPENDS:=@TARGET_ar71xx - KCONFIG:=CONFIG_LEDS_NU801 - FILES:=$(LINUX_DIR)/drivers/leds/leds-nu801.ko - AUTOLOAD:=$(call AutoLoad,60,leds-nu801) -endef - -define KernelPackage/leds-nu801/description - Kernel module for the nu801 LED driver used on the Meraki MR18. -endef - -$(eval $(call KernelPackage,leds-nu801)) - define KernelPackage/leds-rb750 SUBMENU:=$(LEDS_MENU) diff --git a/target/linux/ar71xx/files/drivers/leds/leds-nu801.c b/target/linux/generic/files/drivers/leds/leds-nu801.c similarity index 100% rename from target/linux/ar71xx/files/drivers/leds/leds-nu801.c rename to target/linux/generic/files/drivers/leds/leds-nu801.c diff --git a/target/linux/ar71xx/patches-4.1/818-MIPS-ath79-add-nu801-led-driver.patch b/target/linux/generic/patches-4.1/834-led-nu801.patch similarity index 78% rename from target/linux/ar71xx/patches-4.1/818-MIPS-ath79-add-nu801-led-driver.patch rename to target/linux/generic/patches-4.1/834-led-nu801.patch index e264201..84861b0 100644 --- a/target/linux/ar71xx/patches-4.1/818-MIPS-ath79-add-nu801-led-driver.patch +++ b/target/linux/generic/patches-4.1/834-led-nu801.patch @@ -1,12 +1,12 @@ --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -500,6 +500,13 @@ config LEDS_MENF21BMC - + comment "LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)" - + +config LEDS_NU801 + tristate "LED driver for NU801 RGB LED" -+ depends on LEDS_CLASS && ATH79_MACH_MR18 ++ depends on LEDS_CLASS + help + This option enables support for NU801 RGB LED driver chips + accessed via GPIO. @@ -16,11 +16,11 @@ depends on LEDS_CLASS --- a/drivers/leds/Makefile +++ b/drivers/leds/Makefile -@@ -51,6 +51,7 @@ obj-$(CONFIG_LEDS_ADP5520) += leds-adp5 - obj-$(CONFIG_LEDS_DELL_NETBOOKS) += dell-led.o +@@ -51,6 +51,7 @@ obj-$(CONFIG_LEDS_DELL_NETBOOKS) += dell-led.o obj-$(CONFIG_LEDS_MC13783) += leds-mc13783.o - obj-$(CONFIG_LEDS_RB750) += leds-rb750.o -+obj-$(CONFIG_LEDS_NU801) += leds-nu801.o obj-$(CONFIG_LEDS_NS2) += leds-ns2.o obj-$(CONFIG_LEDS_NETXBIG) += leds-netxbig.o ++obj-$(CONFIG_LEDS_NU801) += leds-nu801.o obj-$(CONFIG_LEDS_ASIC3) += leds-asic3.o + obj-$(CONFIG_LEDS_MAX8997) += leds-max8997.o + obj-$(CONFIG_LEDS_LM355x) += leds-lm355x.o diff --git a/target/linux/ar71xx/patches-4.4/818-MIPS-ath79-add-nu801-led-driver.patch b/target/linux/generic/patches-4.4/835-led-nu801.patch similarity index 78% rename from target/linux/ar71xx/patches-4.4/818-MIPS-ath79-add-nu801-led-driver.patch rename to target/linux/generic/patches-4.4/835-led-nu801.patch index ec9f59e..3273546 100644 --- a/target/linux/ar71xx/patches-4.4/818-MIPS-ath79-add-nu801-led-driver.patch +++ b/target/linux/generic/patches-4.4/835-led-nu801.patch @@ -1,12 +1,12 @@ --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -568,6 +568,13 @@ config LEDS_SEAD3 - + comment "LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)" - + +config LEDS_NU801 + tristate "LED driver for NU801 RGB LED" -+ depends on LEDS_CLASS && ATH79_MACH_MR18 ++ depends on LEDS_CLASS + help + This option enables support for NU801 RGB LED driver chips + accessed via GPIO. @@ -16,11 +16,11 @@ depends on LEDS_CLASS --- a/drivers/leds/Makefile +++ b/drivers/leds/Makefile -@@ -55,6 +55,7 @@ obj-$(CONFIG_LEDS_ADP5520) += leds-adp5 - obj-$(CONFIG_LEDS_DELL_NETBOOKS) += dell-led.o +@@ -55,6 +55,7 @@ obj-$(CONFIG_LEDS_DELL_NETBOOKS) += dell-led.o obj-$(CONFIG_LEDS_MC13783) += leds-mc13783.o - obj-$(CONFIG_LEDS_RB750) += leds-rb750.o -+obj-$(CONFIG_LEDS_NU801) += leds-nu801.o obj-$(CONFIG_LEDS_NS2) += leds-ns2.o obj-$(CONFIG_LEDS_NETXBIG) += leds-netxbig.o ++obj-$(CONFIG_LEDS_NU801) += leds-nu801.o obj-$(CONFIG_LEDS_ASIC3) += leds-asic3.o + obj-$(CONFIG_LEDS_MAX8997) += leds-max8997.o + obj-$(CONFIG_LEDS_LM355x) += leds-lm355x.o -- 2.1.4 _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
