linux/drivers/net/can
Fabio Baltieri 996a953de0 can: add tx/rx LED trigger support
This patch implements the functions to add two LED triggers, named
<ifname>-tx and <ifname>-rx, to a canbus device driver.

Triggers are called from specific handlers by each CAN device driver and
can be disabled altogether with a Kconfig option.

The implementation keeps the LED on when the interface is UP and blinks
the LED on network activity at a configurable rate.

This only supports can-dev based drivers, as it uses some support field
in the can_priv structure.

Supported drivers should call devm_can_led_init() and can_led_event() as
needed.

Cleanup is handled automatically by devres, so no *_exit function is
needed.

Supported events are:
- CAN_LED_EVENT_OPEN: turn on tx/rx LEDs
- CAN_LED_EVENT_STOP: turn off tx/rx LEDs
- CAN_LED_EVENT_TX: trigger tx LED blink
- CAN_LED_EVENT_RX: trigger tx LED blink

Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2013-01-26 16:58:59 +01:00
..
c_can can: Kconfig: convert 'depends on CAN_DEV' into 'if CAN_DEV...endif' block 2013-01-26 16:58:58 +01:00
cc770 can: Kconfig: convert 'depends on CAN_DEV' into 'if CAN_DEV...endif' block 2013-01-26 16:58:58 +01:00
mscan can: Kconfig: convert 'depends on CAN_DEV' into 'if CAN_DEV...endif' block 2013-01-26 16:58:58 +01:00
sja1000 can: sja1000: correct indention of Kconfig help text 2013-01-26 16:58:58 +01:00
softing can: Kconfig: convert 'depends on CAN_DEV' into 'if CAN_DEV...endif' block 2013-01-26 16:58:58 +01:00
usb can: usb_8dev: Add support for USB2CAN interface from 8 devices 2013-01-26 16:58:58 +01:00
at91_can.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-12-12 18:07:07 -08:00
bfin_can.c can: remove __dev* attributes 2012-12-03 11:16:11 -08:00
dev.c can: Do not call dev_put if restart timer is running upon close 2012-11-29 14:30:08 +01:00
flexcan.c can: remove __dev* attributes 2012-12-03 11:16:11 -08:00
grcan.c can: remove __dev* attributes 2012-12-03 11:16:11 -08:00
janz-ican3.c can: remove __dev* attributes 2012-12-03 11:16:11 -08:00
Kconfig can: add tx/rx LED trigger support 2013-01-26 16:58:59 +01:00
led.c can: add tx/rx LED trigger support 2013-01-26 16:58:59 +01:00
Makefile can: add tx/rx LED trigger support 2013-01-26 16:58:59 +01:00
mcp251x.c can: remove __dev* attributes 2012-12-03 11:16:11 -08:00
pch_can.c can: remove __dev* attributes 2012-12-03 11:16:11 -08:00
slcan.c sections: fix section conflicts in drivers/net 2012-10-06 03:04:42 +09:00
ti_hecc.c can: remove __dev* attributes 2012-12-03 11:16:11 -08:00
vcan.c sections: fix section conflicts in drivers/net 2012-10-06 03:04:42 +09:00