linux/drivers/net/can/dev
Vincent Mailhol 39f66c9e22 can: bittiming: change unit of TDC parameters to clock periods
In the current implementation, all Transmission Delay Compensation
(TDC) parameters are expressed in time quantum. However, ISO 11898-1
actually specifies that these should be expressed in *minimum* time
quantum.

Furthermore, the minimum time quantum is specified to be "one node
clock period long" (c.f. paragraph 11.3.1.1 "Bit time"). For sake of
simplicity, we prefer to use the "clock period" term instead of
"minimum time quantum" because we believe that it is more broadly
understood.

This patch fixes that discrepancy by updating the documentation and
the formula for TDCO calculation.

N.B. In can_calc_tdco(), the sample point (in time quantum) was
calculated using a division, thus introducing a risk of rounding and
truncation errors. On top of changing the unit to clock period, we
also modified the formula to use only additions.

Link: https://lore.kernel.org/all/20210918095637.20108-3-mailhol.vincent@wanadoo.fr
Suggested-by: 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:28 +02:00
..
bittiming.c can: bittiming: change unit of TDC parameters to clock periods 2021-10-24 16:24:28 +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: allow user to turn off unsupported features 2021-08-19 15:07:03 +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