]> git.hungrycats.org Git - linux/commit
can: calc_bittiming: add can_calc_sample_point_nrz()
authorVincent Mailhol <mailhol@kernel.org>
Wed, 26 Nov 2025 10:16:14 +0000 (11:16 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 26 Nov 2025 10:20:44 +0000 (11:20 +0100)
commita6ddf91a4f9718cec712785904c57b7117f61d6c
tree6fee796a4198cab2533fa84ecdbb7a4a3e6037e7
parent1d147cb7c51d6e994ba740709072adf270d7b878
can: calc_bittiming: add can_calc_sample_point_nrz()

CAN XL optimal sample point for PWM encoding (when TMS is on) differs
from the NRZ optimal one. There is thus a need to calculate a
different sample point depending whether TMS is on or off.

This is a preparation change: move the sample point calculation from
can_calc_bittiming() into the new can_calc_sample_point_nrz()
function.

In an upcoming change, a function will be added to calculate the
sample point for PWM encoding.

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://patch.msgid.link/20251126-canxl-v8-13-e7e3eb74f889@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev/calc_bittiming.c