From dfd532f540720dbf6bcd0a63b2ef82a57b9a4f86 Mon Sep 17 00:00:00 2001 From: Diana Z Date: Tue, 12 Feb 2019 11:39:07 -0700 Subject: Meep: remove magnetometer The magnetometer will no longer be stuffed on higher board revisions. In order to allow lower board revisions to run sensor test suites, the magnetometer configuration is removed for them as well. BUG=b:115587004,b:124085261 BRANCH=octopus TEST=meep passed previously failing CTS sensor test cases Change-Id: I49996c53c63258631ef65155f86db4c6f7346e59 Signed-off-by: Diana Z Reviewed-on: https://chromium-review.googlesource.com/1467146 Reviewed-by: Karthikeyan Ramasubramanian Reviewed-by: Justin TerAvest Reviewed-by: Jett Rink --- board/meep/board.c | 25 ------------------------- board/meep/board.h | 6 ------ 2 files changed, 31 deletions(-) (limited to 'board') diff --git a/board/meep/board.c b/board/meep/board.c index 00f7bc49b6..4081436276 100644 --- a/board/meep/board.c +++ b/board/meep/board.c @@ -17,7 +17,6 @@ #include "driver/accel_kionix.h" #include "driver/accelgyro_lsm6dsm.h" #include "driver/charger/bd9995x.h" -#include "driver/mag_lis2mdl.h" #include "driver/ppc/nx20p348x.h" #include "driver/tcpm/anx7447.h" #include "driver/tcpm/ps8xxx.h" @@ -123,12 +122,6 @@ const mat33_fp_t base_standard_ref = { { 0, 0, FLOAT_TO_FP(-1)} }; -const mat33_fp_t mag_standard_ref = { - { FLOAT_TO_FP(-1), 0, 0}, - { 0, FLOAT_TO_FP(1), 0}, - { 0, 0, FLOAT_TO_FP(-1)} -}; - /* sensor private data */ static struct kionix_accel_data kx022_data; static struct lsm6dsm_data lsm6dsm_data; @@ -207,24 +200,6 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = LSM6DSM_ODR_MIN_VAL, .max_frequency = LSM6DSM_ODR_MAX_VAL, }, - - [BASE_MAG] = { - .name = "Base Mag", - .active_mask = SENSOR_ACTIVE_S0_S3, - .chip = MOTIONSENSE_CHIP_LIS2MDL, - .type = MOTIONSENSE_TYPE_MAG, - .location = MOTIONSENSE_LOC_BASE, - .drv = &lis2mdl_drv, - .mutex = &g_base_mutex, - .drv_data = LSM6DSM_ST_DATA(lsm6dsm_data, MOTIONSENSE_TYPE_MAG), - .port = I2C_PORT_SENSOR, - .addr = LSM6DSM_ADDR0, - .default_range = 1 << 11, /* 16LSB / uT, fixed */ - .rot_standard_ref = &mag_standard_ref, - .min_frequency = LIS2MDL_ODR_MIN_VAL, - .max_frequency = LIS2MDL_ODR_MAX_VAL, - }, - }; unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); diff --git a/board/meep/board.h b/board/meep/board.h index 9beb1872e3..3932468e7b 100644 --- a/board/meep/board.h +++ b/board/meep/board.h @@ -27,11 +27,6 @@ /* Sensors */ #define CONFIG_ACCEL_KX022 /* Lid accel */ #define CONFIG_ACCELGYRO_LSM6DSM /* Base accel */ -#define CONFIG_MAG_LSM6DSM_LIS2MDL /* Magnetometer behind base accel */ -#define CONFIG_ACCELGYRO_SEC_ADDR LIS2MDL_ADDR0 -#define CONFIG_SENSORHUB_LSM6DSM -#define CONFIG_MAG_CALIBRATE -#define CONFIG_FPU /* Sensors without hardware FIFO are in forced mode */ #define CONFIG_ACCEL_FORCE_MODE_MASK (1 << LID_ACCEL) @@ -83,7 +78,6 @@ enum sensor_id { LID_ACCEL, BASE_ACCEL, BASE_GYRO, - BASE_MAG, SENSOR_COUNT }; -- cgit v1.2.1