diff options
author | Yuval Peress <peress@chromium.org> | 2019-05-20 21:12:02 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-05-23 02:14:21 -0700 |
commit | 2a3f85bb5e6539a802161c8ddd98111e0b048e2b (patch) | |
tree | d97ef19468596494853fc5d7d20bce705f5ac306 /include | |
parent | f25a4cf2477a48fccce07047aaa3bb564c46e802 (diff) | |
download | chrome-ec-2a3f85bb5e6539a802161c8ddd98111e0b048e2b.tar.gz |
driver: lsm6dsm: Move the interrupt GPIO into sensor struct
This changes allows each board to add a custom configuration for the
sensors. In this case particularly setting the GPIO enum that is used
for the interrupt signal in the lsm6dsm.
BUG=b:129159505
BRANCH=arcada
TEST=I ran `make buildall` since this change isn't used yet it doesn't
affect run-time behavior.
Change-Id: I4a2d5e097d5fd8a45af591a24c4e6e917865a093
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1621747
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/motion_sense.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/motion_sense.h b/include/motion_sense.h index 25e4e2fc7c..ff009949e5 100644 --- a/include/motion_sense.h +++ b/include/motion_sense.h @@ -112,6 +112,7 @@ struct motion_data_t { * the components. */ #define MOTIONSENSE_FLAG_IN_SPOOF_MODE BIT(1) +#define MOTIONSENSE_FLAG_INT_SIGNAL BIT(2) struct motion_sensor_t { /* RO fields */ @@ -124,6 +125,8 @@ struct motion_sensor_t { /* One mutex per physical chip. */ struct mutex *mutex; void *drv_data; + /* Only valid if flags & MOTIONSENSE_FLAG_INT_SIGNAL is true. */ + enum gpio_signal int_signal; /* i2c port */ uint8_t port; |