Skip to content

Conversation

@MaureenHelm
Copy link
Member

Converts the fxos8700 sensor driver to the new gpio api. Updates device
trees for all boards with this sensor to active low gpio interrupts by
default (one less i2c transaction than active high), but the driver now
supports active high gpio interrupts if needed.

Tested on frdm_k64f and rv32m1_vega_ri5cy boards. The latter verifies
that the reset output works correctly.

Signed-off-by: Maureen Helm [email protected]

Copy link
Member

@mnkp mnkp left a comment

Choose a reason for hiding this comment

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

LGTM with a minor comment.

Copy link
Contributor

@pabigot pabigot left a comment

Choose a reason for hiding this comment

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

I don't see anything that really concerns me here. I would like to see the bindings yaml updated with a description of each signal, specifically active level. st,hts221.yaml has the prototypical text. That's the only blocking change from me.

Sensor drivers are not consistent in when and how interrupts are managed. For example, I suspect this driver could misbehave if the sensor signaled an event between the point where a previous interrupt was cleared and the interrupts were re-enabled. That's not a new concern, and it might not be relevant for this sensor, so seems out of scope for this conversion. For reference #20017 (comment) discusses the problem and describes an idiomatic solution implemented in hts221.

Copy link
Contributor

Choose a reason for hiding this comment

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

With a rebase this can become gpio_devicetree_flags_t which will pack better. Also reset_flags below.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Converts the fxos8700 sensor driver to the new gpio api. Updates device
trees for all boards with this sensor to active low gpio interrupts by
default.

Tested on frdm_k64f and rv32m1_vega_ri5cy boards. The latter verifies
that the reset output works correctly.

Signed-off-by: Maureen Helm <[email protected]>
Copy link
Contributor

@jfischer-no jfischer-no left a comment

Choose a reason for hiding this comment

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

tested on reel board

@carlescufi carlescufi merged commit f02bae0 into zephyrproject-rtos:topic-gpio Dec 19, 2019
@MaureenHelm MaureenHelm deleted the fxos8700-gpio branch December 19, 2019 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants