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
sensors: Add Bosch BMA4xx-series driver #66242
sensors: Add Bosch BMA4xx-series driver #66242
Conversation
469201d
to
0c8e3b9
Compare
674da2c
to
5648733
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.
Thanks for cleaning up the sample stuff!
Spotted a couple more issues. Note that I will dismiss my review after they have been addressed, since there isn't really anything left in the PR that I know enough about to provide an actual +1.
Also, and maybe a bit of an odd question, do you think boards/arm/pinetime_devkit0/pinetime_devkit0.dts
needs updating, or are you confident that the driver really is compatible with the entire BMA4XX series (if not, a check on CHIP_ID would maybe make sense for the time being?)?
Until now, no driver existed for the bosch,bma4xx
, so the pinetime's accelerometer would have staid disabled.
Thanks!
(fixing the typos, thanks) The BMA4xx series (with the exception of BMA400) has a similar enough API to warrant a common driver, but as you could tell this is tailored towards and tested on the 422. I think it should work with the 421 since they're both 12-bit models but I don't have a way to test that on real hardware. I could check the chip ID and print a warning or even return an error if it's something other than the 422's. |
This is a driver targetting the Bosch BMA 4-series accelerometers. It has been specifically developed for the BMA422 but should be compatible with others in that line, excepting the BMA400. Supports key attributes and async RTIO one-shot operation. I2C operation is supported, with stubs for a SPI implementation provided for future improvement. Signed-off-by: Tristan Honscheid <honscheid@google.com>
5648733
to
a0ebdab
Compare
as mentioned before, dismissing my own review as I don't have enough expertise on the area for an actual +1. Many thanks for adsressing my earlier comments re: sample code.
This is a driver targetting the Bosch BMA 4-series accelerometers. It has been specifically developed for the BMA422 but should be compatible with others in that line, excepting the BMA400. Supports key attributes and async RTIO one-shot operation. I2C operation is supported, with stubs for a SPI implementation provided for future improvement.