Skip to content

Conversation

@pabigot
Copy link
Contributor

@pabigot pabigot commented Dec 22, 2019

Converts the driver to use devicetree properties instead of Kconfig.

Adds a sample demonstrating on-demand and triggered sampling.

NB: I find that the driver returns -EIO on sample fetch within the first hundred observations. It seems likely some timing constraint is being violated.

Add a binding for the sensor and replace all Kconfig selection of
hardware parameters with devicetree property values.

Signed-off-by: Peter Bigot <[email protected]>
@pabigot pabigot requested a review from nashif as a code owner December 23, 2019 13:30
Copy link
Contributor

@dbkinder dbkinder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one little tweak...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use either samples or measures, but not both words. Since you say "samples" below, I'd change this then to say just samples too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with measures/measurements to avoid confusion with the fact this is a sample application.

@stephanosio stephanosio closed this Jan 2, 2020
@stephanosio stephanosio reopened this Jan 2, 2020
@zephyrbot zephyrbot added the area: Tests Issues related to a particular existing or missing test label Jan 2, 2020
@zephyrbot
Copy link

zephyrbot commented Jan 2, 2020

All checks are passing now.

Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accel units should be m/s/s

Add a sample for the MPU6050 that demonstrates on-demand and triggered
display of all sensor data.

Signed-off-by: Peter Bigot <[email protected]>
MPU6050 no longer using Kconfig to specify I2C addresses.  Reference
to the removed symbol causes QA diagnostics.  Remove the reference;
when AK8975 is converted to devicetree it may be possible to restore
the link between the sensors.

Signed-off-by: Peter Bigot <[email protected]>
@pabigot
Copy link
Contributor Author

pabigot commented Jan 3, 2020

@MaureenHelm Units fixed. I added a patch to the ak8975 internal header to eliminate the Kconfig warning, but that device needs to be converted to devicetree.

Copy link
Member

@MaureenHelm MaureenHelm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Units fixed. I added a patch to the ak8975 internal header to eliminate the Kconfig warning, but that device needs to be converted to devicetree.

Thanks.

reg = <0x68>;
status = "okay";
label = "MPU6050";
int-gpios = <&gpio0 11 0>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing flags

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually not missing here: this is targeting master, and GPIO_ACTIVE_HIGH isn't available yet.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, thanks.

reg = <0x68>;
status = "okay";
label = "MPU6050";
int-gpios = <&gpio0 11 0>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, thanks.

@carlescufi carlescufi merged commit 19a0f35 into zephyrproject-rtos:master Jan 8, 2020
@pabigot pabigot deleted the nordic/20191222a branch January 16, 2020 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Devicetree area: Samples Samples area: Sensors Sensors area: Tests Issues related to a particular existing or missing test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants