summaryrefslogtreecommitdiff
path: root/driver/accelgyro_bmi160.c
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2018-11-30 16:23:40 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-02-08 06:03:50 -0800
commitab7fad125320bb719c7bfae952ffa9b8589113ee (patch)
tree97bd429eaf262bb8ff72ef36174ced1692a9cccf /driver/accelgyro_bmi160.c
parent0e23368429f931b8ead7abc1ac63aa0f96f51565 (diff)
downloadchrome-ec-ab7fad125320bb719c7bfae952ffa9b8589113ee.tar.gz
config: Add magnetometer definitions
Add all possible supported or soon-to-be supported configuration of magnetometer behind accelerometers. Use a more generic variable to indicate the i2c address of the secondary device. BUG=b:110143516,b:115587004 BRANCH=none TEST=compile Change-Id: Ic00c413f2ec5fa0e6bf1c98861daa02f00769a65 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1361989 Commit-Ready: Karthikeyan Ramasubramanian <kramasub@chromium.org> Tested-by: Justin TerAvest <teravest@chromium.org> Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'driver/accelgyro_bmi160.c')
-rw-r--r--driver/accelgyro_bmi160.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/accelgyro_bmi160.c b/driver/accelgyro_bmi160.c
index f573a463e4..00e46ce705 100644
--- a/driver/accelgyro_bmi160.c
+++ b/driver/accelgyro_bmi160.c
@@ -1279,7 +1279,7 @@ static int init(const struct motion_sensor_t *s)
/* Set the i2c address of the compass */
ret = raw_write8(s->port, s->addr, BMI160_MAG_IF_0,
- BMI160_SEC_ADDR);
+ CONFIG_ACCELGYRO_SEC_ADDR);
/* Enable the secondary interface as I2C */
ret = raw_write8(s->port, s->addr, BMI160_IF_CONF,