Commit 35a78fd0 authored by Henrik Brix Andersen's avatar Henrik Brix Andersen Committed by Martí Bolívar
Browse files

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: default avatarHenrik Brix Andersen <hebad@vestas.com>
parent 81152d0a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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 */