leds.mk 5.5 KB

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