linux-stable/include/linux/can
Vincent Mailhol 289ea9e4ae can: add new CAN FD bittiming parameters: Transmitter Delay Compensation (TDC)
At high bit rates, the propagation delay from the TX pin to the RX pin
of the transceiver causes measurement errors: the sample point on the
RX pin might occur on the previous bit.

This issue is addressed in ISO 11898-1 section 11.3.3 "Transmitter
delay compensation" (TDC).

This patch adds two new structures: can_tdc and can_tdc_const in order
to implement this TDC.

The structures are then added to can_priv.

A controller supports TDC if an only if can_priv::tdc_const is not
NULL.

TDC is active if and only if:
  - fd flag is on
  - can_priv::tdc.tdco is not zero.
It is the driver responsibility to check those two conditions are met.

No new controller modes are introduced (i.e. no CAN_CTRL_MODE_TDC) in
order not to be redundant with above logic.

The names of the parameters are chosen to match existing CAN
controllers specification. References:
  - Bosch C_CAN FD8:
https://www.bosch-semiconductors.com/media/ip_modules/pdf_2/c_can_fd8/users_manual_c_can_fd8_r210_1.pdf
  - Microchip CAN FD Controller Module:
http://ww1.microchip.com/downloads/en/DeviceDoc/MCP251XXFD-CAN-FD-Controller-Module-Family-Reference-Manual-20005678B.pdf
  - SAM E701/S70/V70/V71 Family:
https://www.mouser.com/datasheet/2/268/60001527A-1284321.pdf

Link: https://lore.kernel.org/r/20210224002008.4158-2-mailhol.vincent@wanadoo.fr
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-03-30 11:14:44 +02:00
..
dev can: remove obsolete get_canfd_dlc() macro 2020-11-20 09:43:30 +01:00
platform can: mcp251x: get rid of legacy platform data 2019-11-11 21:57:28 +01:00
bittiming.h can: add new CAN FD bittiming parameters: Transmitter Delay Compensation (TDC) 2021-03-30 11:14:44 +02:00
can-ml.h net: introduce CAN specific pointer in the struct net_device 2021-02-24 14:32:15 -08:00
core.h can: remove obsolete version strings 2020-10-12 10:06:39 +02:00
dev.h can: add new CAN FD bittiming parameters: Transmitter Delay Compensation (TDC) 2021-03-30 11:14:44 +02:00
led.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
length.h can: length: can_skb_get_frame_len(): introduce function to get data length of frame in data link layer 2021-01-14 08:43:42 +01:00
rx-offload.h can: dev: can_rx_offload_get_echo_skb(): extend to return can frame length 2021-01-14 08:43:43 +01:00
skb.h can: dev: can_free_echo_skb(): extend to return can frame length 2021-03-30 11:14:28 +02:00