mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 05:35:12 +07:00
996a953de0
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>
30 lines
770 B
Makefile
30 lines
770 B
Makefile
#
|
|
# Makefile for the Linux Controller Area Network drivers.
|
|
#
|
|
|
|
obj-$(CONFIG_CAN_VCAN) += vcan.o
|
|
obj-$(CONFIG_CAN_SLCAN) += slcan.o
|
|
|
|
obj-$(CONFIG_CAN_DEV) += can-dev.o
|
|
can-dev-y := dev.o
|
|
|
|
can-dev-$(CONFIG_CAN_LEDS) += led.o
|
|
|
|
obj-y += usb/
|
|
obj-y += softing/
|
|
|
|
obj-$(CONFIG_CAN_SJA1000) += sja1000/
|
|
obj-$(CONFIG_CAN_MSCAN) += mscan/
|
|
obj-$(CONFIG_CAN_C_CAN) += c_can/
|
|
obj-$(CONFIG_CAN_CC770) += cc770/
|
|
obj-$(CONFIG_CAN_AT91) += at91_can.o
|
|
obj-$(CONFIG_CAN_TI_HECC) += ti_hecc.o
|
|
obj-$(CONFIG_CAN_MCP251X) += mcp251x.o
|
|
obj-$(CONFIG_CAN_BFIN) += bfin_can.o
|
|
obj-$(CONFIG_CAN_JANZ_ICAN3) += janz-ican3.o
|
|
obj-$(CONFIG_CAN_FLEXCAN) += flexcan.o
|
|
obj-$(CONFIG_PCH_CAN) += pch_can.o
|
|
obj-$(CONFIG_CAN_GRCAN) += grcan.o
|
|
|
|
ccflags-$(CONFIG_CAN_DEBUG_DEVICES) := -DDEBUG
|