Skip to content

drivers: spi: spi_context.h: remove multithreading dependency #90647

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

Merged

Conversation

nordic-mik7
Copy link
Contributor

@nordic-mik7 nordic-mik7 commented May 27, 2025

Replace semaphores with proper atomic flags when used without multithreading enabled.

teburd
teburd previously requested changes May 27, 2025
Copy link
Collaborator

@teburd teburd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to do thread-free bus operations, RTIO supports this if the driver supports it with only atomics and lock free queues involved.

At a minimum volatile is the wrong thing here imho. But looking a little further... is this really the right approach to doing thread-free SPI when there's a thread-free option available that does the same thing without the caveats?

@nordic-mik7 nordic-mik7 force-pushed the dev/spi_singlethreading_upstream branch 2 times, most recently from 9fe55e4 to 1add805 Compare May 29, 2025 11:27
@nordic-mik7 nordic-mik7 requested a review from teburd May 29, 2025 11:27
@teburd teburd dismissed their stale review May 29, 2025 12:26

Issue addressed, no blockers from me

Replace semaphores with proper atomic flags when used without
multithreading enabled.

Signed-off-by: Michal Kozikowski <[email protected]>
@nordic-mik7 nordic-mik7 force-pushed the dev/spi_singlethreading_upstream branch from 1add805 to 068afd9 Compare May 29, 2025 14:01
Copy link

@nordic-mik7
Copy link
Contributor Author

Ready to be merged.

@teburd
Copy link
Collaborator

teburd commented May 30, 2025

Ready to be merged.

The SPI maintainer @tbursztyka (assignee) needs to review and approve before its ready to merge.

@kartben kartben merged commit df65918 into zephyrproject-rtos:main May 31, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: SPI SPI bus platform: nRF Nordic nRFx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants