linux/drivers/net/can/dev
Vincent Mailhol e8060f08cd can: netlink: add can_priv::do_get_auto_tdcv() to retrieve tdcv from device
Some CAN device can measure the TDCV (Transmission Delay Compensation
Value) automatically for each transmitted CAN frames.

A callback function do_get_auto_tdcv() is added to retrieve that
value. This function is used only if CAN_CTRLMODE_TDC_AUTO is enabled
(if CAN_CTRLMODE_TDC_MANUAL is selected, the TDCV value is provided by
the user).

If the device does not support reporting of TDCV, do_get_auto_tdcv()
should be set to NULL and TDCV will not be reported by the netlink
interface.

On success, do_get_auto_tdcv() shall return 0. If the value can not be
measured by the device, for example because network is down or because
no frames were transmitted yet, can_priv::do_get_auto_tdcv() shall
return a negative error code (e.g. -EINVAL) to signify that the value
is not yet available. In such cases, TDCV is not reported by the
netlink interface.

Link: https://lore.kernel.org/all/20210918095637.20108-6-mailhol.vincent@wanadoo.fr
CC: Stefan Mätje <stefan.maetje@esd.eu>
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-10-24 16:24:29 +02:00
..
bittiming.c can: bittiming: change can_calc_tdco()'s prototype to not directly modify priv 2021-10-24 16:24:29 +02:00
dev.c can: dev: provide optional GPIO based termination support 2021-08-19 15:07:03 +02:00
length.c
Makefile
netlink.c can: netlink: add can_priv::do_get_auto_tdcv() to retrieve tdcv from device 2021-10-24 16:24:29 +02:00
rx-offload.c can: rx-offload: can_rx_offload_threaded_irq_finish(): add new function to be called from threaded interrupt 2021-07-25 11:36:25 +02:00
skb.c can: skb: alloc_can{,fd}_skb(): set "cf" to NULL if skb allocation fails 2021-04-07 09:31:19 +02:00