-
Notifications
You must be signed in to change notification settings - Fork 8.2k
[TOPIC-GPIO] drivers: sensor: Convert fxos8700 to new gpio api #21311
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
[TOPIC-GPIO] drivers: sensor: Convert fxos8700 to new gpio api #21311
Conversation
mnkp
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.
LGTM with a minor comment.
pabigot
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.
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.
drivers/sensor/fxos8700/fxos8700.h
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.
With a rebase this can become gpio_devicetree_flags_t which will pack better. Also reset_flags below.
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.
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]>
jfischer-no
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.
tested on reel board
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]