linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/5] Introducing new CAN FD bittiming parameters: Transmission Delay Compensation (TDC)
@ 2021-02-23 16:28 Vincent Mailhol
  2021-02-23 16:28 ` [PATCH v1 1/5] can: add new CAN FD bittiming parameters: Transmitter " Vincent Mailhol
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Vincent Mailhol @ 2021-02-23 16:28 UTC (permalink / raw)
  To: Marc Kleine-Budde, linux-can, Oliver Hartkopp
  Cc: Wolfgang Grandegger, Vincent Mailhol

At high bit rates, the propagation delay from the TX pin to the RX pin
of the transceiver causes measurement errors and needs to be
corrected.

To solve this issue, ISO 11898-1 introduces in section 11.3.3
"Transmitter delay compensation" (here after TDC) a SSP (Secondary
Sample Point) equal to the distance, in time quanta, from the start of
the bit time on the TX pin to the actual measurement on the RX pin.

This patch series implements the TDC parameters which allow the
controller to calculate that SSP.

The first patch introduces the new structures, the second one saves
eight bytes on struct can_priv, the third fix some existing checkpatch
warnings in preparation on the next one, the fourth one implement the
netlink interface and, finally, the fifth one add the calculation.

This is a follow-up on the RFC is sent already more than one month
ago.

Ref: https://lore.kernel.org/linux-can/CAMZ6RqLtg1ynVeePLLriUw0+KLbTpPJHapTEanv1_EZYJSrK=g@mail.gmail.com/T/#u

Changes from the RFC:
  - The RFC was a single e-mail with all comments in bulk, made this a
    proper patch series.
  - Added the netlink interface.
  - Rename the function can_set_tdc to can_calc_tdco (the formula is
    the same, everything around was reworked).
  - Other small miscellaneous changes.

TODO: the documentation will be updated after the netlink interface
gets approved.

Vincent Mailhol (5):
  can: add new CAN FD bittiming parameters: Transmitter Delay
    Compensation (TDC)
  can: dev: reorder struct can_priv members for better packing
  can: netlink: move '=' operators back to previous line (checkpatch
    fix)
  can: add netlink interface for CAN-FD Transmitter Delay Compensation
    (TDC)
  can: bittiming: add calculation for CAN FD Transmitter Delay
    Compensation (TDC)

 drivers/net/can/dev/bittiming.c  |  23 +++++++
 drivers/net/can/dev/netlink.c    | 100 ++++++++++++++++++++++++++-----
 include/linux/can/bittiming.h    |  71 ++++++++++++++++++++++
 include/linux/can/dev.h          |  14 +++--
 include/uapi/linux/can/netlink.h |   6 ++
 5 files changed, 194 insertions(+), 20 deletions(-)


base-commit: 1b34628ac60360ef7455c00f01dc62f82ed08d8c
-- 
2.26.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-02-24  1:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 16:28 [PATCH v1 0/5] Introducing new CAN FD bittiming parameters: Transmission Delay Compensation (TDC) Vincent Mailhol
2021-02-23 16:28 ` [PATCH v1 1/5] can: add new CAN FD bittiming parameters: Transmitter " Vincent Mailhol
2021-02-23 16:28 ` [PATCH v1 2/5] can: dev: reorder struct can_priv members for better packing Vincent Mailhol
2021-02-23 16:28 ` [PATCH v1 3/5] can: netlink: move '=' operators back to previous line (checkpatch fix) Vincent Mailhol
2021-02-23 19:47   ` Marc Kleine-Budde
2021-02-24  0:05     ` Vincent MAILHOL
2021-02-23 19:49   ` Marc Kleine-Budde
2021-02-24  0:10     ` Vincent MAILHOL
2021-02-23 16:28 ` [PATCH v1 4/5] can: add netlink interface for CAN-FD Transmitter Delay Compensation (TDC) Vincent Mailhol
2021-02-23 19:52   ` Marc Kleine-Budde
2021-02-23 16:28 ` [PATCH v1 5/5] can: bittiming: add calculation for CAN FD " Vincent Mailhol

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).