Commit 06f502f5 authored by Ben Whitten's avatar Ben Whitten Committed by Jacek Anaszewski

leds: trigger: Introduce a NETDEV trigger

This commit introduces a NETDEV trigger for named device
activity. Available triggers are link, rx, and tx.
Signed-off-by: default avatarBen Whitten <ben.whitten@gmail.com>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
parent e0d42298
What: /sys/class/leds/<led>/device_name
Date: Dec 2017
KernelVersion: 4.16
Contact: linux-leds@vger.kernel.org
Description:
Specifies the network device name to monitor.
What: /sys/class/leds/<led>/interval
Date: Dec 2017
KernelVersion: 4.16
Contact: linux-leds@vger.kernel.org
Description:
Specifies the duration of the LED blink in milliseconds.
Defaults to 50 ms.
What: /sys/class/leds/<led>/link
Date: Dec 2017
KernelVersion: 4.16
Contact: linux-leds@vger.kernel.org
Description:
Signal the link state of the named network device.
If set to 0 (default), the LED's normal state is off.
If set to 1, the LED's normal state reflects the link state
of the named network device.
Setting this value also immediately changes the LED state.
What: /sys/class/leds/<led>/tx
Date: Dec 2017
KernelVersion: 4.16
Contact: linux-leds@vger.kernel.org
Description:
Signal transmission of data on the named network device.
If set to 0 (default), the LED will not blink on transmission.
If set to 1, the LED will blink for the milliseconds specified
in interval to signal transmission.
What: /sys/class/leds/<led>/rx
Date: Dec 2017
KernelVersion: 4.16
Contact: linux-leds@vger.kernel.org
Description:
Signal reception of data on the named network device.
If set to 0 (default), the LED will not blink on reception.
If set to 1, the LED will blink for the milliseconds specified
in interval to signal reception.
...@@ -135,4 +135,11 @@ config LEDS_TRIGGER_PANIC ...@@ -135,4 +135,11 @@ config LEDS_TRIGGER_PANIC
a different trigger. a different trigger.
If unsure, say Y. If unsure, say Y.
config LEDS_TRIGGER_NETDEV
tristate "LED Netdev Trigger"
depends on NET && LEDS_TRIGGERS
help
This allows LEDs to be controlled by network device activity.
If unsure, say Y.
endif # LEDS_TRIGGERS endif # LEDS_TRIGGERS
...@@ -12,3 +12,4 @@ obj-$(CONFIG_LEDS_TRIGGER_DEFAULT_ON) += ledtrig-default-on.o ...@@ -12,3 +12,4 @@ obj-$(CONFIG_LEDS_TRIGGER_DEFAULT_ON) += ledtrig-default-on.o
obj-$(CONFIG_LEDS_TRIGGER_TRANSIENT) += ledtrig-transient.o obj-$(CONFIG_LEDS_TRIGGER_TRANSIENT) += ledtrig-transient.o
obj-$(CONFIG_LEDS_TRIGGER_CAMERA) += ledtrig-camera.o obj-$(CONFIG_LEDS_TRIGGER_CAMERA) += ledtrig-camera.o
obj-$(CONFIG_LEDS_TRIGGER_PANIC) += ledtrig-panic.o obj-$(CONFIG_LEDS_TRIGGER_PANIC) += ledtrig-panic.o
obj-$(CONFIG_LEDS_TRIGGER_NETDEV) += ledtrig-netdev.o
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment