diff options
author | Yegor Yefremov <yegorslists@googlemail.com> | 2015-03-16 09:38:13 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2015-03-22 23:50:11 +0100 |
commit | c54eb70e3bb8cd0d7b8564bedab63e834656c567 (patch) | |
tree | a910f5408ea2f0bf9c7aab2d100348e14b5ce559 /include/linux/can | |
parent | fba6f9117a3d87a269fc3b174127c99f25f4979e (diff) | |
download | blackbird-obmc-linux-c54eb70e3bb8cd0d7b8564bedab63e834656c567.tar.gz blackbird-obmc-linux-c54eb70e3bb8cd0d7b8564bedab63e834656c567.zip |
can: add combined rx/tx LED trigger support
Add <ifname>-rxtx trigger, that will be activated both for tx
as rx events. This trigger mimics "activity" LED for Ethernet
devices.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'include/linux/can')
-rw-r--r-- | include/linux/can/dev.h | 2 | ||||
-rw-r--r-- | include/linux/can/led.h | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index c05ff0f9f9a5..c3a9c8fc60fa 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h @@ -61,6 +61,8 @@ struct can_priv { char tx_led_trig_name[CAN_LED_NAME_SZ]; struct led_trigger *rx_led_trig; char rx_led_trig_name[CAN_LED_NAME_SZ]; + struct led_trigger *rxtx_led_trig; + char rxtx_led_trig_name[CAN_LED_NAME_SZ]; #endif }; diff --git a/include/linux/can/led.h b/include/linux/can/led.h index e0475c5cbb92..146de4506d21 100644 --- a/include/linux/can/led.h +++ b/include/linux/can/led.h @@ -21,8 +21,10 @@ enum can_led_event { #ifdef CONFIG_CAN_LEDS -/* keep space for interface name + "-tx"/"-rx" suffix and null terminator */ -#define CAN_LED_NAME_SZ (IFNAMSIZ + 4) +/* keep space for interface name + "-tx"/"-rx"/"-rxtx" + * suffix and null terminator + */ +#define CAN_LED_NAME_SZ (IFNAMSIZ + 6) void can_led_event(struct net_device *netdev, enum can_led_event event); void devm_can_led_init(struct net_device *netdev); |