-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
drivers: spi: nrfx_spim: Add support for device runtime PM #75715
drivers: spi: nrfx_spim: Add support for device runtime PM #75715
Conversation
b250f29
to
34bda38
Compare
34bda38
to
aab48c6
Compare
Enable the device runtime power management on the SPIM shim. Upstream PR: zephyrproject-rtos/zephyr#75715 Signed-off-by: Adam Kondraciuk <[email protected]>
Add configuration for testing SPI with device runtime PM enabled for nRF platforms. Upstream PR: zephyrproject-rtos/zephyr#75715 Signed-off-by: Adam Kondraciuk <[email protected]>
Enable the device runtime power management on the SPIM shim. Upstream PR: zephyrproject-rtos/zephyr#75715 Signed-off-by: Adam Kondraciuk <[email protected]>
Add configuration for testing SPI with device runtime PM enabled for nRF platforms. Upstream PR: zephyrproject-rtos/zephyr#75715 Signed-off-by: Adam Kondraciuk <[email protected]>
…e PM Enable the device runtime power management on the SPIM shim. Upstream PR: zephyrproject-rtos/zephyr#75715 Signed-off-by: Adam Kondraciuk <[email protected]>
Add configuration for testing SPI with device runtime PM enabled for nRF platforms. Upstream PR: zephyrproject-rtos/zephyr#75715 Signed-off-by: Adam Kondraciuk <[email protected]>
…e PM Enable the device runtime power management on the SPIM shim. Upstream PR: zephyrproject-rtos/zephyr#75715 Signed-off-by: Adam Kondraciuk <[email protected]> (cherry picked from commit 35e51a2)
Add configuration for testing SPI with device runtime PM enabled for nRF platforms. Upstream PR: zephyrproject-rtos/zephyr#75715 Signed-off-by: Adam Kondraciuk <[email protected]> (cherry picked from commit b20e5fd)
…e PM Enable the device runtime power management on the SPIM shim. Upstream PR: zephyrproject-rtos/zephyr#75715 Signed-off-by: Adam Kondraciuk <[email protected]> (cherry picked from commit 35e51a2)
Add configuration for testing SPI with device runtime PM enabled for nRF platforms. Upstream PR: zephyrproject-rtos/zephyr#75715 Signed-off-by: Adam Kondraciuk <[email protected]> (cherry picked from commit b20e5fd)
…e PM Enable the device runtime power management on the SPIM shim. Upstream PR: zephyrproject-rtos/zephyr#75715 Signed-off-by: Adam Kondraciuk <[email protected]> (cherry picked from commit 35e51a2)
Add configuration for testing SPI with device runtime PM enabled for nRF platforms. Upstream PR: zephyrproject-rtos/zephyr#75715 Signed-off-by: Adam Kondraciuk <[email protected]> (cherry picked from commit b20e5fd)
…e PM Enable the device runtime power management on the SPIM shim. Upstream PR: zephyrproject-rtos/zephyr#75715 Signed-off-by: Adam Kondraciuk <[email protected]> (cherry picked from commit 35e51a2)
Add configuration for testing SPI with device runtime PM enabled for nRF platforms. Upstream PR: zephyrproject-rtos/zephyr#75715 Signed-off-by: Adam Kondraciuk <[email protected]> (cherry picked from commit b20e5fd)
This code works incorrectly in the case of Here's what happens when SPI transactions are split into two calls of spi_transceive()
And I've got lucky because switching to power down does not break the transaction. Probably idle pin states between the bytes match power down states. It does not make sense to call By the way, all zephyr SPI drivers with device runtime support I've seen does not handle this flags. Probably generic solution will be to integrate device runtime calls into spi_context.h. |
@rda-emcraft Can you rise an issue with this please? That will make easier to implement this. |
Hm, maybe issue is not needed as this is PR only. |
@nordic-piks, @adamkondraciuk I have read more of spi_context.h and now I think you should call What I'm trying to say is that part of runtime device PM (_get() and put()) for SPI drivers can be implemented in generic SPI context handling code. Driver only need to supply initialization and code to do real PM operations. Anyway, I'm really new in Zephyr, so any guidance is appreciated. And I'm sitting on Zephyr 3.5.99 and calling |
I've created pull request to your branch implementing proposed changes. |
bcb0856
to
62062bb
Compare
tests/drivers/spi/spi_controller_peripheral/boards/nrf52840dk_nrf52840.overlay
Outdated
Show resolved
Hide resolved
Enable the device runtime power management on the SPIM shim. Signed-off-by: Adam Kondraciuk <[email protected]> Signed-off-by: Nikodem Kastelik <[email protected]>
Add configuration for testing SPI with device runtime PM enabled for nRF platforms. Signed-off-by: Adam Kondraciuk <[email protected]> Signed-off-by: Nikodem Kastelik <[email protected]>
62062bb
to
dc3d693
Compare
Enable the device runtime power management on the SPIM shim.