From 35a78fd034d57c41ca5e677d936e5a77dbb8d9d5 Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Fri, 1 Apr 2022 21:10:01 +0200 Subject: [PATCH] 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 --- tests/drivers/can/timing/src/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/drivers/can/timing/src/main.c b/tests/drivers/can/timing/src/main.c index df858e6cbd4..cef3b0e7bfd 100644 --- a/tests/drivers/can/timing/src/main.c +++ b/tests/drivers/can/timing/src/main.c @@ -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 */