From 2a3f85bb5e6539a802161c8ddd98111e0b048e2b Mon Sep 17 00:00:00 2001 From: Yuval Peress Date: Mon, 20 May 2019 21:12:02 -0600 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/1621747 Legacy-Commit-Queue: Commit Bot Reviewed-by: Jett Rink --- board/bloog/board.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'board/bloog') diff --git a/board/bloog/board.c b/board/bloog/board.c index 2efeefe073..6bf29ed642 100644 --- a/board/bloog/board.c +++ b/board/bloog/board.c @@ -163,6 +163,8 @@ struct motion_sensor_t motion_sensors[] = { .mutex = &g_base_mutex, .drv_data = LSM6DSM_ST_DATA(lsm6dsm_data, MOTIONSENSE_TYPE_ACCEL), + .int_signal = GPIO_BASE_SIXAXIS_INT_L, + .flags = MOTIONSENSE_FLAG_INT_SIGNAL, .port = I2C_PORT_SENSOR, .addr = LSM6DSM_ADDR0, .rot_standard_ref = &base_standard_ref, @@ -193,6 +195,8 @@ struct motion_sensor_t motion_sensors[] = { .mutex = &g_base_mutex, .drv_data = LSM6DSM_ST_DATA(lsm6dsm_data, MOTIONSENSE_TYPE_GYRO), + .int_signal = GPIO_BASE_SIXAXIS_INT_L, + .flags = MOTIONSENSE_FLAG_INT_SIGNAL, .port = I2C_PORT_SENSOR, .addr = LSM6DSM_ADDR0, .default_range = 1000 | ROUND_UP_FLAG, /* dps */ -- cgit v1.2.1