-
Notifications
You must be signed in to change notification settings - Fork 8.3k
soc: silabs: siwx91x: link pm state to power domain and adjust driver #100116
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
Changes from all commits
c1a6252
241784b
997023f
0848a82
9f1da5c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -555,6 +555,7 @@ static int gspi_siwx91x_transceive(const struct device *dev, const struct spi_co | |
| ret = gspi_siwx91x_config(dev, config, cb, userdata); | ||
| if (ret) { | ||
| spi_context_release(&data->ctx, ret); | ||
| pm_device_runtime_put(dev); | ||
| return ret; | ||
| } | ||
| } | ||
|
|
@@ -566,6 +567,9 @@ static int gspi_siwx91x_transceive(const struct device *dev, const struct spi_co | |
| if (spi_siwx91x_is_dma_enabled_instance(dev)) { | ||
| /* Perform DMA transceive */ | ||
| ret = gspi_siwx91x_transceive_dma(dev, config); | ||
| if (ret < 0) { | ||
| pm_device_runtime_put(dev); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happens if
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since this PR is mainly about PM, would do it in another PR. |
||
| } | ||
| spi_context_release(&data->ctx, ret); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW, is the context released when
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above comment. |
||
| } else { | ||
| /* Perform synchronous polling transceive */ | ||
|
|
||
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.
Should we also call pm_device_runtime_put() and pm_device_runtime_get() in DMA drivers to ensure that the user doesn’t have to explicitly manage this for memory-to-memory transfers?
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.
I wonder to add that like intel has done here: dma_intel_adsp_hda.c
I will try but I fear that we miss some cases that introduce some bugs.
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.
that's done, seems to works