tests: drivers: can: timing: adjust sample point locations

Adjust the sample point locations for the higher bitrates to match those
used in the Linux kernel. These sample points are much more likely to be
met for a wider set of CAN controllers and their timing parameter
boundaries.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2022-04-01 21:10:01 +02:00 committed by Marti Bolivar
commit 35a78fd034

View file

@ -40,7 +40,7 @@ static const struct can_timing_test can_timing_tests[] = {
/** Standard bitrates. */
{ 125000, 875, false },
{ 500000, 875, false },
{ 1000000, 875, false },
{ 1000000, 750, false },
/** Additional, valid sample points. */
{ 125000, 900, false },
{ 125000, 800, false },
@ -48,10 +48,10 @@ static const struct can_timing_test can_timing_tests[] = {
{ 125000, 1000, true },
#ifdef CONFIG_CAN_FD_MODE
/** Invalid CAN-FD bitrate, valid sample point. */
{ 8000000 + 1, 875, true },
{ 8000000 + 1, 750, true },
#else /* CONFIG_CAN_FD_MODE */
/** Invalid classical bitrate, valid sample point. */
{ 1000000 + 1, 875, true },
{ 1000000 + 1, 750, true },
#endif /* CONFIG_CAN_FD_MODE */
};
@ -69,7 +69,7 @@ static const struct can_timing_test can_timing_data_tests[] = {
/** Valid bitrate, invalid sample point. */
{ 500000, 1000, true },
/** Invalid CAN-FD bitrate, valid sample point. */
{ 8000000 + 1, 875, true },
{ 8000000 + 1, 750, true },
};
#endif /* CONFIG_CAN_FD_MODE */