leds.mk 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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. LEDS_MENU:=LED modules
  8. define KernelPackage/leds-gpio
  9. SUBMENU:=$(LEDS_MENU)
  10. TITLE:=GPIO LED support
  11. DEPENDS:= @GPIO_SUPPORT
  12. KCONFIG:=CONFIG_LEDS_GPIO
  13. FILES:=$(LINUX_DIR)/drivers/leds/leds-gpio.ko
  14. AUTOLOAD:=$(call AutoLoad,60,leds-gpio,1)
  15. endef
  16. define KernelPackage/leds-gpio/description
  17. Kernel module for LEDs on GPIO lines
  18. endef
  19. $(eval $(call KernelPackage,leds-gpio))
  20. LED_TRIGGER_DIR=$(LINUX_DIR)/drivers/leds/trigger
  21. define KernelPackage/ledtrig-heartbeat
  22. SUBMENU:=$(LEDS_MENU)
  23. TITLE:=LED Heartbeat Trigger
  24. KCONFIG:=CONFIG_LEDS_TRIGGER_HEARTBEAT
  25. FILES:=$(LED_TRIGGER_DIR)/ledtrig-heartbeat.ko
  26. AUTOLOAD:=$(call AutoLoad,50,ledtrig-heartbeat)
  27. endef
  28. define KernelPackage/ledtrig-gpio/description
  29. Kernel module that allows LEDs to blink like heart beat
  30. endef
  31. $(eval $(call KernelPackage,ledtrig-heartbeat))
  32. define KernelPackage/ledtrig-gpio
  33. SUBMENU:=$(LEDS_MENU)
  34. TITLE:=LED GPIO Trigger
  35. KCONFIG:=CONFIG_LEDS_TRIGGER_GPIO
  36. FILES:=$(LED_TRIGGER_DIR)/ledtrig-gpio.ko
  37. AUTOLOAD:=$(call AutoLoad,50,ledtrig-gpio)
  38. endef
  39. define KernelPackage/ledtrig-gpio/description
  40. Kernel module that allows LEDs to be controlled by gpio events
  41. endef
  42. $(eval $(call KernelPackage,ledtrig-gpio))
  43. define KernelPackage/ledtrig-morse
  44. SUBMENU:=$(LEDS_MENU)
  45. TITLE:=LED Morse Trigger
  46. KCONFIG:=CONFIG_LEDS_TRIGGER_MORSE
  47. FILES:=$(LINUX_DIR)/drivers/leds/ledtrig-morse.ko
  48. AUTOLOAD:=$(call AutoLoad,50,ledtrig-morse)
  49. endef
  50. define KernelPackage/ledtrig-morse/description
  51. Kernel module to show morse coded messages on LEDs
  52. endef
  53. $(eval $(call KernelPackage,ledtrig-morse))
  54. define KernelPackage/ledtrig-netdev
  55. SUBMENU:=$(LEDS_MENU)
  56. TITLE:=LED NETDEV Trigger
  57. KCONFIG:=CONFIG_LEDS_TRIGGER_NETDEV
  58. FILES:=$(LINUX_DIR)/drivers/leds/ledtrig-netdev.ko
  59. AUTOLOAD:=$(call AutoLoad,50,ledtrig-netdev)
  60. endef
  61. define KernelPackage/ledtrig-netdev/description
  62. Kernel module to drive LEDs based on network activity
  63. endef
  64. $(eval $(call KernelPackage,ledtrig-netdev))
  65. define KernelPackage/ledtrig-netfilter
  66. SUBMENU:=$(LEDS_MENU)
  67. TITLE:=LED NetFilter Trigger
  68. DEPENDS:=kmod-ipt-core
  69. KCONFIG:=CONFIG_NETFILTER_XT_TARGET_LED
  70. FILES:=$(LINUX_DIR)/net/netfilter/xt_LED.ko
  71. AUTOLOAD:=$(call AutoLoad,50,xt_LED)
  72. endef
  73. define KernelPackage/ledtrig-netfilter/description
  74. Kernel module to flash LED when a particular packets passing through your machine.
  75. For example to create an LED trigger for incoming SSH traffic:
  76. iptables -A INPUT -p tcp --dport 22 -j LED --led-trigger-id ssh --led-delay 1000
  77. Then attach the new trigger to an LED on your system:
  78. echo netfilter-ssh > /sys/class/leds/<ledname>/trigger
  79. endef
  80. $(eval $(call KernelPackage,ledtrig-netfilter))
  81. define KernelPackage/ledtrig-usbdev
  82. SUBMENU:=$(LEDS_MENU)
  83. TITLE:=LED USB device Trigger
  84. DEPENDS:=@USB_SUPPORT kmod-usb-core
  85. KCONFIG:=CONFIG_LEDS_TRIGGER_USBDEV
  86. FILES:=$(LINUX_DIR)/drivers/leds/ledtrig-usbdev.ko
  87. AUTOLOAD:=$(call AutoLoad,50,ledtrig-usbdev)
  88. endef
  89. define KernelPackage/ledtrig-usbdev/description
  90. Kernel module to drive LEDs based on USB device presence/activity
  91. endef
  92. $(eval $(call KernelPackage,ledtrig-usbdev))
  93. define KernelPackage/ledtrig-default-on
  94. SUBMENU:=$(LEDS_MENU)
  95. TITLE:=LED Default ON Trigger
  96. KCONFIG:=CONFIG_LEDS_TRIGGER_DEFAULT_ON
  97. FILES:=$(LED_TRIGGER_DIR)/ledtrig-default-on.ko
  98. AUTOLOAD:=$(call AutoLoad,50,ledtrig-default-on,1)
  99. endef
  100. define KernelPackage/ledtrig-default-on/description
  101. Kernel module that allows LEDs to be initialised in the ON state
  102. endef
  103. $(eval $(call KernelPackage,ledtrig-default-on))
  104. define KernelPackage/ledtrig-timer
  105. SUBMENU:=$(LEDS_MENU)
  106. TITLE:=LED Timer Trigger
  107. KCONFIG:=CONFIG_LEDS_TRIGGER_TIMER
  108. FILES:=$(LED_TRIGGER_DIR)/ledtrig-timer.ko
  109. AUTOLOAD:=$(call AutoLoad,50,ledtrig-timer,1)
  110. endef
  111. define KernelPackage/ledtrig-timer/description
  112. Kernel module that allows LEDs to be controlled by a programmable timer
  113. via sysfs
  114. endef
  115. $(eval $(call KernelPackage,ledtrig-timer))
  116. define KernelPackage/ledtrig-transient
  117. SUBMENU:=$(LEDS_MENU)
  118. TITLE:=LED Transient Trigger
  119. KCONFIG:=CONFIG_LEDS_TRIGGER_TRANSIENT
  120. FILES:=$(LED_TRIGGER_DIR)/ledtrig-transient.ko
  121. AUTOLOAD:=$(call AutoLoad,50,ledtrig-transient,1)
  122. endef
  123. define KernelPackage/ledtrig-transient/description
  124. Kernel module that allows LEDs one time activation of a transient state.
  125. endef
  126. $(eval $(call KernelPackage,ledtrig-transient))
  127. define KernelPackage/ledtrig-oneshot
  128. SUBMENU:=$(LEDS_MENU)
  129. TITLE:=LED One-Shot Trigger
  130. KCONFIG:=CONFIG_LEDS_TRIGGER_ONESHOT
  131. FILES:=$(LED_TRIGGER_DIR)/ledtrig-oneshot.ko
  132. AUTOLOAD:=$(call AutoLoad,50,ledtrig-oneshot)
  133. endef
  134. define KernelPackage/ledtrig-oneshot/description
  135. Kernel module that allows LEDs to be triggered by sporadic events in
  136. one-shot pulses
  137. endef
  138. $(eval $(call KernelPackage,ledtrig-oneshot))
  139. define KernelPackage/leds-pca963x
  140. SUBMENU:=$(LEDS_MENU)
  141. TITLE:=PCA963x LED support
  142. DEPENDS:=+kmod-i2c-core
  143. KCONFIG:=CONFIG_LEDS_PCA963X
  144. FILES:=$(LINUX_DIR)/drivers/leds/leds-pca963x.ko
  145. AUTOLOAD:=$(call AutoLoad,60,leds-pca963x,1)
  146. endef
  147. define KernelPackage/leds-pca963x/description
  148. Driver for the NXP PCA963x I2C LED controllers.
  149. endef
  150. $(eval $(call KernelPackage,leds-pca963x))
  151. define KernelPackage/leds-tlc59116
  152. SUBMENU:=$(LEDS_MENU)
  153. TITLE:=TLC59116 LED support
  154. DEPENDS:=@TARGET_mvebu +kmod-i2c-core +kmod-regmap
  155. KCONFIG:=CONFIG_LEDS_TLC59116
  156. FILES:=$(LINUX_DIR)/drivers/leds/leds-tlc59116.ko
  157. AUTOLOAD:=$(call AutoLoad,60,leds-tlc59116,1)
  158. endef
  159. define KernelPackage/leds-tlc59116/description
  160. Kernel module for LEDs on TLC59116
  161. endef
  162. $(eval $(call KernelPackage,leds-tlc59116))