linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
	linux-can <linux-can@vger.kernel.org>,
	Oliver Hartkopp <socketcan@hartkopp.net>
Cc: Wolfgang Grandegger <wg@grandegger.com>,
	Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Subject: [PATCH v2 0/5] Introducing new CAN FD bittiming parameters: Transmission Delay Compensation (TDC)
Date: Wed, 24 Feb 2021 09:20:03 +0900	[thread overview]
Message-ID: <20210224002008.4158-1-mailhol.vincent@wanadoo.fr> (raw)

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 fixes some existing
checkpatch warnings in preparation on the next one, the fourth one
implements the netlink interface and, finally, the fifth one adds 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

You might also be interested in below patch which implement those
changes in iproute command line:
https://lore.kernel.org/linux-can/20210223181714.219655-1-mailhol.vincent@wanadoo.fr/T/#t
Because this v2 introduced no changes on the netlink interface, the
iproute patch will *not* be resend.

Changes from v1:
  - Changed the commit message of the first patch of the serie to
    clarify the condition of when TDC is active.
  - Changed the alignment style from tabulations to single space in
    drivers/net/can/dev/netlink.c
  - Remove duplicated [IFLA_CAN_TERMINATION] entry in
    drivers/net/can/dev/netlink.c

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 it was reworked).
  - Other small miscellaneous changes.

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


Yours sincerely,
Vincent

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


             reply	other threads:[~2021-02-24  1:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24  0:20 Vincent Mailhol [this message]
2021-02-24  0:20 ` [PATCH v2 1/5] can: add new CAN FD bittiming parameters: Transmitter Delay Compensation (TDC) Vincent Mailhol
2021-02-24  7:31   ` Marc Kleine-Budde
2021-03-09  8:30     ` Jimmy Assarsson
2021-03-09  8:34       ` Marc Kleine-Budde
2021-03-09  9:09         ` Jimmy Assarsson
2021-06-16  9:54   ` Marc Kleine-Budde
2021-06-16 12:44     ` Vincent MAILHOL
2021-02-24  0:20 ` [PATCH v2 2/5] can: dev: reorder struct can_priv members for better packing Vincent Mailhol
2021-02-24  0:20 ` [PATCH v2 3/5] can: netlink: move '=' operators back to previous line (checkpatch fix) Vincent Mailhol
2021-02-24  0:20 ` [PATCH v2 4/5] can: add netlink interface for CAN-FD Transmitter Delay Compensation (TDC) Vincent Mailhol
2021-03-09 13:16   ` Vincent MAILHOL
2021-03-09 13:19     ` Marc Kleine-Budde
2021-03-15 15:59   ` Marc Kleine-Budde
2021-03-16 15:16     ` Vincent MAILHOL
2021-03-16 15:29       ` Marc Kleine-Budde
2021-04-05  2:29         ` Vincent MAILHOL
2021-04-07  8:15           ` Marc Kleine-Budde
2021-02-24  0:20 ` [PATCH v2 5/5] can: bittiming: add calculation for CAN FD " Vincent Mailhol

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210224002008.4158-1-mailhol.vincent@wanadoo.fr \
    --to=mailhol.vincent@wanadoo.fr \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=socketcan@hartkopp.net \
    --cc=wg@grandegger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).