summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2019-05-20 21:12:02 -0600
committerCommit Bot <commit-bot@chromium.org>2019-08-02 17:47:51 +0000
commit37672b3e980001a5a890001c5be18cd3e842c53f (patch)
tree395092b69b08c48c316a575c9dd26a5710dcec1d /include
parent595e5e826e976e4f98d815b6399f2d35ba85d364 (diff)
downloadchrome-ec-37672b3e980001a5a890001c5be18cd3e842c53f.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> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1719560 Reviewed-by: Edward Hill <ecgh@chromium.org> Tested-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/motion_sense.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/motion_sense.h b/include/motion_sense.h
index 4ac0b42fcd..28612f0454 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;