From 1bebf37965d2d017e306cf0191bf323ce97d9c67 Mon Sep 17 00:00:00 2001 From: Divya Sasidharan Date: Mon, 8 Aug 2016 17:04:57 -0700 Subject: barometer: Add barometer driver for BMP280 in EC BMP280 driver API is designed to work with motion sensor task. The sensor sampling parameters are configured optimally for handheld device in accordance with BMP280 spec recommendation. BUG=None BRANCH=master TEST=Tested on amenia; with appropriate .odr in board file test command "accelread 4" returns raw pressure value in Pa; accelinfo on 4000 shows Pa value. Change-Id: I3f4c0c33a77dd317aa1425624d3cc7f4ec6b45a1 Signed-off-by: Divya Sasidharan Reviewed-on: https://chromium-review.googlesource.com/351660 Commit-Ready: Divya S Sasidharan Tested-by: Divya S Sasidharan Reviewed-by: Gwendal Grignou --- include/config.h | 3 +++ include/ec_commands.h | 2 ++ 2 files changed, 5 insertions(+) (limited to 'include') diff --git a/include/config.h b/include/config.h index a315d1c15b..86964d1617 100644 --- a/include/config.h +++ b/include/config.h @@ -57,6 +57,9 @@ #undef CONFIG_ACCELGYRO_LSM6DS0 #undef CONFIG_ACCELGYRO_BMI160 +/* Specify barometer attached */ +#undef CONFIG_BARO_BMP280 + /* * Use the old standard reference frame for accelerometers. The old * reference frame is: diff --git a/include/ec_commands.h b/include/ec_commands.h index 4f5b130833..c1abb72b6b 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -1795,6 +1795,7 @@ enum motionsensor_type { MOTIONSENSE_TYPE_PROX = 3, MOTIONSENSE_TYPE_LIGHT = 4, MOTIONSENSE_TYPE_ACTIVITY = 5, + MOTIONSENSE_TYPE_BARO = 6, MOTIONSENSE_TYPE_MAX, }; @@ -1816,6 +1817,7 @@ enum motionsensor_chip { MOTIONSENSE_CHIP_KX022 = 6, MOTIONSENSE_CHIP_L3GD20H = 7, MOTIONSENSE_CHIP_BMA255 = 8, + MOTIONSENSE_CHIP_BMP280 = 9, }; struct ec_response_motion_sensor_data { -- cgit v1.2.1