24a03ddf032f23e33253d8216198aa6685d125e2
[openwrt/openwrt.git] / package / kernel / linux / modules / leds.mk
1 #
2 # Copyright (C) 2006-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 LEDS_MENU:=LED modules
9
10 define KernelPackage/leds-gpio
11 SUBMENU:=$(LEDS_MENU)
12 TITLE:=GPIO LED support
13 DEPENDS:= @GPIO_SUPPORT
14 KCONFIG:=CONFIG_LEDS_GPIO
15 FILES:=$(LINUX_DIR)/drivers/leds/leds-gpio.ko
16 AUTOLOAD:=$(call AutoLoad,60,leds-gpio,1)
17 endef
18
19 define KernelPackage/leds-gpio/description
20 Kernel module for LEDs on GPIO lines
21 endef
22
23 $(eval $(call KernelPackage,leds-gpio))
24
25
26 define KernelPackage/ledtrig-heartbeat
27 SUBMENU:=$(LEDS_MENU)
28 TITLE:=LED Heartbeat Trigger
29 KCONFIG:=CONFIG_LEDS_TRIGGER_HEARTBEAT
30 FILES:=$(LINUX_DIR)/drivers/leds/$(if $(call kernel_patchver_ge,3.10),trigger/)ledtrig-heartbeat.ko
31 AUTOLOAD:=$(call AutoLoad,50,ledtrig-heartbeat)
32 endef
33
34 define KernelPackage/ledtrig-gpio/description
35 Kernel module that allows LEDs to blink like heart beat
36 endef
37
38 $(eval $(call KernelPackage,ledtrig-heartbeat))
39
40
41 define KernelPackage/ledtrig-gpio
42 SUBMENU:=$(LEDS_MENU)
43 TITLE:=LED GPIO Trigger
44 KCONFIG:=CONFIG_LEDS_TRIGGER_GPIO
45 FILES:=$(LINUX_DIR)/drivers/leds/$(if $(call kernel_patchver_ge,3.10),trigger/)ledtrig-gpio.ko
46 AUTOLOAD:=$(call AutoLoad,50,ledtrig-gpio)
47 endef
48
49 define KernelPackage/ledtrig-gpio/description
50 Kernel module that allows LEDs to be controlled by gpio events
51 endef
52
53 $(eval $(call KernelPackage,ledtrig-gpio))
54
55
56 define KernelPackage/ledtrig-morse
57 SUBMENU:=$(LEDS_MENU)
58 TITLE:=LED Morse Trigger
59 KCONFIG:=CONFIG_LEDS_TRIGGER_MORSE
60 FILES:=$(LINUX_DIR)/drivers/leds/ledtrig-morse.ko
61 AUTOLOAD:=$(call AutoLoad,50,ledtrig-morse)
62 endef
63
64 define KernelPackage/ledtrig-morse/description
65 Kernel module to show morse coded messages on LEDs
66 endef
67
68 $(eval $(call KernelPackage,ledtrig-morse))
69
70
71 define KernelPackage/ledtrig-netdev
72 SUBMENU:=$(LEDS_MENU)
73 TITLE:=LED NETDEV Trigger
74 KCONFIG:=CONFIG_LEDS_TRIGGER_NETDEV
75 FILES:=$(LINUX_DIR)/drivers/leds/ledtrig-netdev.ko
76 AUTOLOAD:=$(call AutoLoad,50,ledtrig-netdev)
77 endef
78
79 define KernelPackage/ledtrig-netdev/description
80 Kernel module to drive LEDs based on network activity
81 endef
82
83 $(eval $(call KernelPackage,ledtrig-netdev))
84
85
86 define KernelPackage/ledtrig-netfilter
87 SUBMENU:=$(LEDS_MENU)
88 TITLE:=LED NetFilter Trigger
89 DEPENDS:=kmod-ipt-core
90 KCONFIG:=CONFIG_NETFILTER_XT_TARGET_LED
91 FILES:=$(LINUX_DIR)/net/netfilter/xt_LED.ko
92 AUTOLOAD:=$(call AutoLoad,50,xt_LED)
93 endef
94
95 define KernelPackage/ledtrig-netfilter/description
96 Kernel module to flash LED when a particular packets passing through your machine.
97
98 For example to create an LED trigger for incoming SSH traffic:
99 iptables -A INPUT -p tcp --dport 22 -j LED --led-trigger-id ssh --led-delay 1000
100 Then attach the new trigger to an LED on your system:
101 echo netfilter-ssh > /sys/class/leds/<ledname>/trigger
102 endef
103
104 $(eval $(call KernelPackage,ledtrig-netfilter))
105
106
107 define KernelPackage/ledtrig-usbdev
108 SUBMENU:=$(LEDS_MENU)
109 TITLE:=LED USB device Trigger
110 DEPENDS:=@USB_SUPPORT kmod-usb-core
111 KCONFIG:=CONFIG_LEDS_TRIGGER_USBDEV
112 FILES:=$(LINUX_DIR)/drivers/leds/ledtrig-usbdev.ko
113 AUTOLOAD:=$(call AutoLoad,50,ledtrig-usbdev)
114 endef
115
116 define KernelPackage/ledtrig-usbdev/description
117 Kernel module to drive LEDs based on USB device presence/activity
118 endef
119
120 $(eval $(call KernelPackage,ledtrig-usbdev))
121
122
123 define KernelPackage/ledtrig-default-on
124 SUBMENU:=$(LEDS_MENU)
125 TITLE:=LED Default ON Trigger
126 KCONFIG:=CONFIG_LEDS_TRIGGER_DEFAULT_ON
127 FILES:=$(LINUX_DIR)/drivers/leds/$(if $(call kernel_patchver_ge,3.10),trigger/)ledtrig-default-on.ko
128 AUTOLOAD:=$(call AutoLoad,50,ledtrig-default-on,1)
129 endef
130
131 define KernelPackage/ledtrig-default-on/description
132 Kernel module that allows LEDs to be initialised in the ON state
133 endef
134
135 $(eval $(call KernelPackage,ledtrig-default-on))
136
137
138 define KernelPackage/ledtrig-timer
139 SUBMENU:=$(LEDS_MENU)
140 TITLE:=LED Timer Trigger
141 KCONFIG:=CONFIG_LEDS_TRIGGER_TIMER
142 FILES:=$(LINUX_DIR)/drivers/leds/$(if $(call kernel_patchver_ge,3.10),trigger/)ledtrig-timer.ko
143 AUTOLOAD:=$(call AutoLoad,50,ledtrig-timer,1)
144 endef
145
146 define KernelPackage/ledtrig-timer/description
147 Kernel module that allows LEDs to be controlled by a programmable timer
148 via sysfs
149 endef
150
151 $(eval $(call KernelPackage,ledtrig-timer))
152
153
154 define KernelPackage/ledtrig-oneshot
155 SUBMENU:=$(LEDS_MENU)
156 TITLE:=LED One-Shot Trigger
157 DEPENDS:=@!LINUX_3_3
158 KCONFIG:=CONFIG_LEDS_TRIGGER_ONESHOT
159 FILES:=$(LINUX_DIR)/drivers/leds/$(if $(call kernel_patchver_ge,3.10),trigger/)ledtrig-oneshot.ko
160 AUTOLOAD:=$(call AutoLoad,50,ledtrig-oneshot)
161 endef
162
163 define KernelPackage/ledtrig-oneshot/description
164 Kernel module that allows LEDs to be triggered by sporadic events in
165 one-shot pulses
166 endef
167
168 $(eval $(call KernelPackage,ledtrig-oneshot))
169
170
171 define KernelPackage/leds-tlc59116
172 SUBMENU:=$(LEDS_MENU)
173 TITLE:=TLC59116 LED support
174 DEPENDS:=@TARGET_mvebu kmod-i2c-core
175 KCONFIG:=CONFIG_LEDS_TLC59116
176 FILES:=$(LINUX_DIR)/drivers/leds/leds-tlc59116.ko
177 AUTOLOAD:=$(call AutoLoad,60,leds-tlc59116,1)
178 endef
179
180 define KernelPackage/leds-tlc59116/description
181 Kernel module for LEDs on TLC59116
182 endef
183
184 $(eval $(call KernelPackage,leds-tlc59116))