diff options
author | Philip Chen <philipchen@google.com> | 2017-11-07 19:13:38 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-11-14 10:11:20 -0800 |
commit | 49b0f33e186ae5c65dd490ad0d304868608c9f1d (patch) | |
tree | 826295e56be05c5b82b42edd9f58a8fe840a78f3 | |
parent | 68bd2d4fb278781d1ff7c40f42f43e8e445d89ac (diff) | |
download | chrome-ec-49b0f33e186ae5c65dd490ad0d304868608c9f1d.tar.gz |
scarlet: Remove barometer bmp280
BUG=b:69011927
BRANCH=none
TEST=manually boot Dru and verify no complaint about baro init failure
Change-Id: I35fd5636ac833bad81ce91969cdf94a79833486f
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/757938
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r-- | board/scarlet/board.c | 40 | ||||
-rw-r--r-- | board/scarlet/board.h | 5 | ||||
-rw-r--r-- | board/scarlet/gpio.inc | 1 |
3 files changed, 0 insertions, 46 deletions
diff --git a/board/scarlet/board.c b/board/scarlet/board.c index ee6b4eab69..558ece8540 100644 --- a/board/scarlet/board.c +++ b/board/scarlet/board.c @@ -16,7 +16,6 @@ #include "ec_commands.h" #include "driver/accelgyro_bmi160.h" #include "driver/charger/rt946x.h" -#include "driver/baro_bmp280.h" #include "driver/tcpm/fusb302.h" #include "driver/temp_sensor/tmp432.h" #include "extpower.h" @@ -120,7 +119,6 @@ BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); /* SPI devices */ const struct spi_device_t spi_devices[] = { { CONFIG_SPI_ACCEL_PORT, 1, GPIO_SPI_ACCEL_CS_L }, - { CONFIG_SPI_ACCEL_PORT, 1, GPIO_SPI_BARO_CS_L }, }; const unsigned int spi_devices_used = ARRAY_SIZE(spi_devices); @@ -368,8 +366,6 @@ const matrix_3x3_t base_standard_ref = { { 0, 0, FLOAT_TO_FP(1)} }; -static struct bmp280_drv_data_t bmp280_drv_data; - struct motion_sensor_t motion_sensors[] = { /* * Note: bmi160: supports accelerometer and gyro sensor @@ -452,42 +448,6 @@ struct motion_sensor_t motion_sensors[] = { }, }, }, - [LID_BARO] = { - .name = "Baro", - .active_mask = SENSOR_ACTIVE_S0_S3, - .chip = MOTIONSENSE_CHIP_BMP280, - .type = MOTIONSENSE_TYPE_BARO, - .location = MOTIONSENSE_LOC_LID, - .drv = &bmp280_drv, - .drv_data = &bmp280_drv_data, - .port = CONFIG_SPI_ACCEL_PORT, - .addr = BMI160_SET_SPI_ADDRESS(CONFIG_SPI_ACCEL_PORT), - .default_range = 1 << 18, /* 1bit = 4 Pa, 16bit ~= 2600 hPa */ - .min_frequency = BMP280_BARO_MIN_FREQ, - .max_frequency = BMP280_BARO_MAX_FREQ, - .config = { - /* AP: by default shutdown all sensors */ - [SENSOR_CONFIG_AP] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S0 */ - [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S3] = { - .odr = 0, - .ec_rate = 0, - }, - /* Sensor off in S3/S5 */ - [SENSOR_CONFIG_EC_S5] = { - .odr = 0, - .ec_rate = 0, - }, - }, - }, }; const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); #endif /* defined(HAS_TASK_MOTIONSENSE) */ diff --git a/board/scarlet/board.h b/board/scarlet/board.h index a9115e2b74..1d45efddb0 100644 --- a/board/scarlet/board.h +++ b/board/scarlet/board.h @@ -83,7 +83,6 @@ #define CONFIG_ACCELGYRO_BMI160 #define CONFIG_ACCEL_INTERRUPTS #define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4) -#define CONFIG_BARO_BMP280 /* To be able to indicate the device is in tablet mode. */ #define CONFIG_TABLET_MODE_SWITCH @@ -92,9 +91,6 @@ #define CONFIG_ACCEL_FIFO 256 #define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO / 3) -/* Sensors without hardware FIFO are in forced mode. */ -#define CONFIG_ACCEL_FORCE_MODE_MASK (1 << LID_BARO) - /* USB PD config */ #define CONFIG_CHARGE_MANAGER #define CONFIG_USB_POWER_DELIVERY @@ -207,7 +203,6 @@ enum power_signal { enum sensor_id { LID_ACCEL = 0, LID_GYRO, - LID_BARO, }; #include "gpio_signal.h" diff --git a/board/scarlet/gpio.inc b/board/scarlet/gpio.inc index e88319814f..a7c52e3fb1 100644 --- a/board/scarlet/gpio.inc +++ b/board/scarlet/gpio.inc @@ -59,7 +59,6 @@ GPIO(I2C1_SDA, PIN(B, 11), GPIO_INPUT) GPIO(BOARD_ID, PIN(C, 0), GPIO_ANALOG) /* SPI sensors */ -GPIO(SPI_BARO_CS_L, PIN(B, 12), GPIO_OUT_HIGH) GPIO(SPI_ACCEL_CS_L, PIN(D, 0), GPIO_OUT_HIGH) /* Scarlet LEDs */ |