-
Notifications
You must be signed in to change notification settings - Fork 671
[nrf fromtree] drivers: spi: spi_nrfx_spi: remove multithreading dependency #2907
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
Conversation
f0b527a
to
57435f3
Compare
57435f3
to
bc69e4b
Compare
8304257
to
9e44861
Compare
2405a6c
to
124e29f
Compare
This dependency was always there but not explicitly defined. By adding the explicit dependency it becomes more obvious what is wrong when SPI is enabled but GPIO disabled. This was found when building `samples/bluetooth/peripheral` for `nrf54l15dk/nrf54l15/cpuapp` with `CONFIG_GPIO=n`. Before we got: - A linker error in `spi_nrfx_common.c` failing to reference some nrfx_gpiote APIs. - A linker error in `spi_nrfx_spim.c` failing to reference the GPIO dts entry. Now we will get a warning of that GPIO is not enabled With this it becomes more obvious that SPI driver is enabled by default because of the external flash mounted on the DK. Signed-off-by: Rubin Gerritsen <[email protected]> (cherry picked from commit 577a004)
124e29f
to
8c97a70
Compare
@anangl @ahasztag Please review and approve if you find time; upstream PR already reviewed and pending merge: |
Please change the second commit to fromtree. |
const uint32_t tms = k_uptime_get_32(); | ||
|
||
while (!atomic_get(&ctx->ready) && (k_uptime_get_32() - tms < timeout_ms)) { | ||
k_busy_wait(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why k_busy_wait(1)
is needed here? I'd rather say this should be an empty while loop, this does only add unnecessary code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is unnecessary indeed... Already merged to upstream though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving in advance, just one non-blocking suggestion
…endency Replace semaphores with proper atomic flags when used without multithreading enabled. Related: NCSDK-33699 Signed-off-by: Michal Kozikowski <[email protected]> (cherry picked from commit df65918)
8c97a70
to
5350c72
Compare
|
Replace semaphores with proper atomic flags when used without multithreading enabled.
Related: NCSDK-33699