summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLukasz Majewski <lukma@denx.de>2024-07-10 12:06:51 +0200
committerLee Jones <lee@kernel.org>2024-08-01 13:40:01 +0100
commit6b08d07cac64c0dcf1dbb4584bdf95d0f789a520 (patch)
treec12901556827093115e7db489d05c7614f0af15d /include
parentb5a7fc286c0f1a1f6e50b030a9450cf39ba100b1 (diff)
leds: trigger: netdev: Add support for tx_err and rx_err notification with LEDs
This patch provides support for enabling blinking of LEDs when RX or TX errors are detected. Approach taken in this patch is similar to one for TX or RX data transmission indication (i.e. TRIGGER_NETDEV_TX/RX attribute). One can inspect transmission errors with: ip -s link show eth0 Example LED configuration: cd /sys/devices/platform/amba_pl@0/a001a000.leds/leds/ echo netdev > mode:blue/trigger && \ echo eth0 > mode:blue/device_name && \ echo 1 > mode:blue/tx_err Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20240710100651.4059887-1-lukma@denx.de Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/leds.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 6885603f211b..e5968c3ed4ae 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -611,6 +611,8 @@ enum led_trigger_netdev_modes {
TRIGGER_NETDEV_FULL_DUPLEX,
TRIGGER_NETDEV_TX,
TRIGGER_NETDEV_RX,
+ TRIGGER_NETDEV_TX_ERR,
+ TRIGGER_NETDEV_RX_ERR,
/* Keep last */
__TRIGGER_NETDEV_MAX,