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/arcada_ish/board.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'board/arcada_ish') diff --git a/board/arcada_ish/board.c b/board/arcada_ish/board.c index 2bba8bd0da..f5e3d3ef0b 100644 --- a/board/arcada_ish/board.c +++ b/board/arcada_ish/board.c @@ -60,6 +60,8 @@ struct motion_sensor_t motion_sensors[] = { .mutex = &g_lid_mutex, .drv_data = LSM6DSM_ST_DATA(lsm6dsm_a_data, MOTIONSENSE_TYPE_ACCEL), + .int_signal = GPIO_ACCEL_GYRO_INT_L, + .flags = MOTIONSENSE_FLAG_INT_SIGNAL, .port = I2C_PORT_SENSOR, .addr = LSM6DSM_ADDR1, .rot_standard_ref = &lid_rot_ref, @@ -88,6 +90,8 @@ struct motion_sensor_t motion_sensors[] = { .mutex = &g_lid_mutex, .drv_data = LSM6DSM_ST_DATA(lsm6dsm_a_data, MOTIONSENSE_TYPE_GYRO), + .int_signal = GPIO_ACCEL_GYRO_INT_L, + .flags = MOTIONSENSE_FLAG_INT_SIGNAL, .port = I2C_PORT_SENSOR, .addr = LSM6DSM_ADDR1, .default_range = 1000 | ROUND_UP_FLAG, /* dps */ -- cgit v1.2.1