drivers: sensor: bma4xx: Implement streaming APIs#83575
Conversation
|
Hello @PeggyCienet, and thank you very much for your first pull request to the Zephyr project! |
teburd
left a comment
There was a problem hiding this comment.
Looks good to me, the board overlay for the shell is a bit off though. I don't think we have a great way of dealing with this sort of thing unfortunately. Maybe @MaureenHelm will have some other thoughts, happy to approve once the shell board overlay has been discussed as the RTIO and sensor related changes look good to me.
5b17b1a to
d1c62ce
Compare
yperess
left a comment
There was a problem hiding this comment.
Can you include a sample output in the PR description?
d1c62ce to
e13a97e
Compare
MaureenHelm
left a comment
There was a problem hiding this comment.
Each commit should correspond to a self-contained, meaningful change. For example, adding a feature, fixing a bug, or refactoring existing code should be separate commits. Avoid mixing different types of changes (e.g., feature implementation and unrelated refactoring) in the same commit.
https://docs.zephyrproject.org/latest/contribute/contributor_expectations.html#pr-requirements
4f6cb65 to
5b7378c
Compare
eff8dfc to
04d9c76
Compare
yperess
left a comment
There was a problem hiding this comment.
The last commit is still a bit large, it seems like we could split it up to
- moving the common code and decoder to the separate files. This would be an easy change to review since it should be all cut/paste
- implementing the streaming logic
This will allow reviewers to focus on the new logic during the review. Overall this is looking really good.
yperess
left a comment
There was a problem hiding this comment.
Previous comment should have been a request for changes, sorry.
beb5f64 to
a540bc7
Compare
Added register definitions, bit masks, and related constants for the BMA4XX sensor in a separate header file. Signed-off-by: Peggy Chen <peggy.chen@cienet.com>
Updated the sensor configuration to use the bma4xx_safely_configure function for safer and more reliable initialization. Signed-off-by: Peggy Chen <peggy.chen@cienet.com>
Refactor the sensor decoder code into individual files for improved maintainability and readability. Signed-off-by: Peggy Chen <peggy.chen@cienet.com>
Refactor the sensor submit logic into individual files to enhance maintainability and readability. Signed-off-by: Peggy Chen <peggy.chen@cienet.com>
Enable the sensor emulator and address related issues to ensure proper functionality. Signed-off-by: Peggy Chen <peggy.chen@cienet.com>
Add a streaming implementation for the BMA4XX using both FIFO watermark and FIFO full interrupts. A batch duration of 3,000 have been used for verification. Signed-off-by: Peggy Chen <peggy.chen@cienet.com>
a540bc7 to
85c13f3
Compare
|
Hi @yperess, @MaureenHelm, @teburd, I've updated this PR and separated the changes into 6 commits. However, it shows |
|
Hi @yperess, @MaureenHelm, @teburd, I have made the necessary updates to the PR based on your feedback and have organized the changes into 6 separate commits. Whenever you have a moment, could you kindly review this PR? Thank you! |
|
Hi @PeggyCienet! 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! 🪁 |
Since zephyrproject-rtos#83575 bma4xx driver relies on RTIO to work. This means that CONFIG_I2C_RTIO should be defined together with CONFIG_I2C in the Kconfig, otherwise I2C_DT_IODEV_DEFINE() won't be available at build time. Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Since #83575 bma4xx driver relies on RTIO to work. This means that CONFIG_I2C_RTIO should be defined together with CONFIG_I2C in the Kconfig, otherwise I2C_DT_IODEV_DEFINE() won't be available at build time. Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Since zephyrproject-rtos#83575 bma4xx driver relies on RTIO to work. This means that CONFIG_I2C_RTIO should be defined together with CONFIG_I2C in the Kconfig, otherwise I2C_DT_IODEV_DEFINE() won't be available at build time. Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Add a streaming implementation for the BMA4XX using both FIFO watermark and FIFO full interrupts.
A batch duration of 3,000 have been used for verification.