History

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.

Yegor Yefremov committed 11 years ago

Commit c54eb701 parent fba6f913 files · +25 −5Browse files

Showing the changes to include/linux/can (2 of 3 files). Show all

Unified · Split

2 files
  1. include/linux/can/dev.h +2 −0
  2. include/linux/can/led.h +4 −2
include/linux/can/dev.h+2−0
@@ -61,6 +61,8 @@ struct can_priv { · 60 unmodified lines
61 char tx_led_trig_name[CAN_LED_NAME_SZ];61 char tx_led_trig_name[CAN_LED_NAME_SZ];
62 struct led_trigger *rx_led_trig;62 struct led_trigger *rx_led_trig;
63 char rx_led_trig_name[CAN_LED_NAME_SZ];63 char rx_led_trig_name[CAN_LED_NAME_SZ];
64 struct led_trigger *rxtx_led_trig;
65 char rxtx_led_trig_name[CAN_LED_NAME_SZ];
64#endif66#endif
65};67};
66 68
include/linux/can/led.h+4−2
@@ -21,8 +21,10 @@ enum can_led_event { · 20 unmodified lines
21 21
22#ifdef CONFIG_CAN_LEDS22#ifdef CONFIG_CAN_LEDS
23 23
24/* keep space for interface name + "-tx"/"-rx" suffix and null terminator */24/* keep space for interface name + "-tx"/"-rx"/"-rxtx"
25#define CAN_LED_NAME_SZ (IFNAMSIZ + 4)25 * suffix and null terminator
26 */
27#define CAN_LED_NAME_SZ (IFNAMSIZ + 6)
26 28
27void can_led_event(struct net_device *netdev, enum can_led_event event);29void can_led_event(struct net_device *netdev, enum can_led_event event);
28void devm_can_led_init(struct net_device *netdev);30void devm_can_led_init(struct net_device *netdev);