-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Tdk invensense icp101xx pressure sensor #84081
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
Tdk invensense icp101xx pressure sensor #84081
Conversation
|
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
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 think the renaming should happen in the same commit where the old binding is removed, so the history can be bisected.
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.
Fixed, thanks for your review.
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.
This is usually placed in the main source file.
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.
Fixed, thanks for your review.
c6b4f31 to
9ed1ee8
Compare
9ed1ee8 to
3d3b1fd
Compare
teburd
left a comment
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.
Please consider dropping float math, unclear what the tdk hal is providing here to be frank.
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.
There doesn't seem to be a good reason to split this into a .h file, unless there's multiple .c files needing this it should be in the same compliation unit to keep things simple
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'm a bit confused by this call here, you are setting up a struct on the stack, then passing it in by reference, then its unused past this point. This seems wasteful if the result is copied in struct members into device data struct?
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.
Totally agree, this is completely useless, removed.
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.
Is this call out to the tdk hal really needed? Isn't this simply reading a few registers?
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.
This create a specific command sent over I2C.
It seems better to have a dedicated function.
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.
Isn't this equivalent to i2c_write() with a simple register write? Why is the TDK HAL needed here?
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.
This creates a specific command sent over I2C (depending on selected mode).
It seems better to have a dedicated function.
3d3b1fd to
f4f01b0
Compare
teburd
left a comment
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.
reasonable answers/fixes given I think to my review comments
Thanks for the review and approval ! |
f4f01b0 to
227b663
Compare
teburd
left a comment
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.
Refresh +1
227b663 to
3be0ef6
Compare
modules/hal_tdk/Kconfig
Outdated
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.
| bool "ICP101XX Barometric Pressure and Temperature Sensor" | |
| bool "ICP101XX Barometric Pressure and Temperature Sensors" |
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.
| description: ICP101xx High Accuracy, Low Power, Barometric Pressure and Temperature Sensor IC | |
| description: ICP101xx High Accuracy, Low Power, Barometric Pressure and Temperature Sensors IC |
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.
| #error "ICP101XX driver enabled without any devices" | |
| #error "ICP101XX driver enabled without any compatible devices in devicetree" |
drivers/sensor/tdk/icp101xx/Kconfig
Outdated
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.
| Enable driver for ICP101XX barometric pressure/temperature sensor. | |
| Enable driver for ICP101XX barometric pressure/temperature sensors. |
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 the suggested changes, all taken into account.
Could you please approve if ok for you?
3be0ef6 to
aec39dd
Compare
icp101xx are barometric pressure and temperature sensors. https://invensense.tdk.com/smartpressure Signed-off-by: Remi Buisson <[email protected]>
Use official TDK Invensense driver for icp101xx sensor in tdk_hal module. Signed-off-by: Remi Buisson <[email protected]>
Replace icp10125. tests: sensor: rename icp10125 to icp101xx Signed-off-by: Remi Buisson <[email protected]>
aec39dd to
744541b
Compare
|
Hi @rbuisson-invn! 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! 🪁 |
drivers: sensor: icp101xx: supports icp101xx sensors
dts: supports icp101xx invn pressure sensor
module: HAL TDK module
Adds official TDK Invensense Inc. driver in TDK HAL module for icp101xx sensor.
Replacing icp10125 unofficial driver
Validated with custom setup: nrf52dk_nrf52832 + icp10125 Piromoni board
Signed-off-by: Remi Buisson [email protected]