Skip to content

tests: spi_loopback: Improve CS loopback test code #93222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

decsny
Copy link
Member

@decsny decsny commented Jul 16, 2025

Use atomic_t instead of sem, print error info, and make more flexible

Fixes #92200

decsny added 2 commits July 16, 2025 15:13
Use an atomic_t instead of semaphore for counting the CS, semaphore is
too heavy and wrong choice for this variable.

Also, print what the actual value gotten was in case of error.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The helper function should have the flexibility to have different
expected CS counts. Namely, the test cases where the transfer is
essentially empty should not need to assert CS and many platforms are
failing on CS testing currently due to expecting CS assert and deassert
despite it being a 0 clock/bit transfer being specified.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
@decsny decsny force-pushed the spi_loopback_cs_improves branch from f955ca0 to 6601f89 Compare July 16, 2025 20:13
@decsny decsny requested review from tbursztyka and teburd July 16, 2025 20:13
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: SPI SPI bus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CS check on SPI loopback test case
2 participants