-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
i2c: stm32: dma enhancement #81814
i2c: stm32: dma enhancement #81814
Conversation
Hello @sgilbert182, and thank you very much for your first pull request to the Zephyr project! |
1adf73d
to
601d56f
Compare
@sgilbert182 Thanks for this contribution. We'll try to review in best delays. Meanwhile,please have a look at feedback reported by compliance scripts |
357f005
to
d465675
Compare
Hi, no worries. I tested this on a g4 |
@sgilbert182 Quick hint: |
d465675
to
57b1147
Compare
57b1147
to
057bc2b
Compare
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.
Initial review attempt:
Mains request before going further:
Did you consider implementing I2C_CALLBACK
which is supposed to be the async version of I2C API while you're at?
If adding DMA support it would be more logical to make use of this API which allows truly async transfers rather than adding DMA support on a blocking API.
Reason I ask is to avoid current state of STM32 SPI driver which is in a similar state today with a sync API allowing use of DMA and ASYNC API effectively blocking.
(Note also that driver is supposed to get further changes to support RTIO API, so let's limit the changes to where it makes real sense)
Then let's club all DMA related additions to the driver in a single commit to make it easier to review.
Finally, if possible, let's rebase on top of #82015 (once merged) in order to get rid of clang-format suggestions.
I did not, I was porting over changes I was using for a project but I can take a look at this when I have time.
I will revert this
should I close this MR until this can be rebased and I've had a chance to look at the callback mechanism? |
057bc2b
to
94c6e1d
Compare
Would be great. Thanks
Not required. But for clarity, you can move it to draft. |
cfd0b0a
to
8c030ea
Compare
d9dfabf
to
f31a764
Compare
Add initial DMA settings structs to stm32 i2c config and data structs Signed-off-by: Simon Gilbert <srdgilbert@gmail.com>
Add macrobatics to pull DMA settings from device tree Signed-off-by: Simon Gilbert <srdgilbert@gmail.com>
Add DMA options (phandle-array and names) to yaml file Signed-off-by: Simon Gilbert <srdgilbert@gmail.com>
Tidy up of i2c_stm32_transfer and added TX and RX semaphore inits Signed-off-by: Simon Gilbert <srdgilbert@gmail.com>
Added stop DMA fot transmit complete or other master end conditions Signed-off-by: Simon Gilbert <srdgilbert@gmail.com>
f31a764
to
3de249d
Compare
1f02218
to
731423c
Compare
Add basic cache memory support Signed-off-by: Simon Gilbert <srdgilbert@gmail.com>
731423c
to
7b5ca2a
Compare
@JarmouniA PTAL |
@JarmouniA Do you think you'll be able to have a new look soon ? Your comments have been addressed as far as I can tell. |
Hi @sgilbert182! To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge. Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁 |
Sorry I missed the notif, yes they have been addressed. |
Add DMA enhancement for stm32 i2c_v2 driver
Fix #34354