From 6711629163f23a98099d8c6d37f6cdb1ef56ca52 Mon Sep 17 00:00:00 2001 From: Kevin K Wong Date: Wed, 30 Mar 2016 16:42:40 -0700 Subject: sensor: update sensor driver to use I2C port from motion_sensor_t this allow motion sensor devices to be locate on different I2C port BUG=none BRANCH=none TEST=make buildall Change-Id: Ia7ba2f5729ebb19561768ec87fdb267e79aafb6a Signed-off-by: Kevin K Wong Reviewed-on: https://chromium-review.googlesource.com/334269 Reviewed-by: Shawn N --- board/ryu/board.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'board/ryu/board.c') diff --git a/board/ryu/board.c b/board/ryu/board.c index a6712aa21b..aa59a6778a 100644 --- a/board/ryu/board.c +++ b/board/ryu/board.c @@ -298,6 +298,7 @@ struct motion_sensor_t motion_sensors[] = { .drv = &bmi160_drv, .mutex = &g_mutex, .drv_data = &g_bmi160_data, + .port = I2C_PORT_ACCEL, .addr = BMI160_ADDR0, .rot_standard_ref = &accelgyro_standard_ref, .default_range = 8, /* g, use hifi requirements */ @@ -332,6 +333,7 @@ struct motion_sensor_t motion_sensors[] = { .drv = &bmi160_drv, .mutex = &g_mutex, .drv_data = &g_bmi160_data, + .port = I2C_PORT_ACCEL, .addr = BMI160_ADDR0, .default_range = 1000, /* dps, use hifi requirement */ .rot_standard_ref = &accelgyro_standard_ref, @@ -366,6 +368,7 @@ struct motion_sensor_t motion_sensors[] = { .drv = &bmi160_drv, .mutex = &g_mutex, .drv_data = &g_bmi160_data, + .port = I2C_PORT_ACCEL, .addr = BMI160_ADDR0, .rot_standard_ref = &mag_standard_ref, .default_range = 1 << 11, /* 16LSB / uT, fixed */ @@ -434,6 +437,7 @@ struct motion_sensor_t motion_sensors[] = { .drv = &si114x_drv, .mutex = &g_mutex, .drv_data = &g_si114x_data, + .port = I2C_PORT_ALS, .addr = SI114X_ADDR, .rot_standard_ref = NULL, .default_range = 7630, /* Upon testing at desk */ -- cgit v1.2.1