mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 18:41:11 +00:00
kevin: Add FIFO for ARC++ support.
Add Sensor FIFO, set the sensors in force mode since we haven't enabled their FIFO. BRANCH=kevin BUG=b:27849483 TEST=Check kernel load cros-ec-ring. Check ARC++ get accel info with AIDA64. Change-Id: I1c4d5c1291d2c778fdabd8b8f4e6b6a370f37b04 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/373140 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
681284ca22
commit
4523735dc1
@@ -448,7 +448,8 @@ struct motion_sensor_t motion_sensors[] = {
|
||||
* Requirement: accelerometer sensor must init before gyro sensor
|
||||
* DO NOT change the order of the following table.
|
||||
*/
|
||||
{.name = "Base Accel",
|
||||
[BASE_ACCEL] = {
|
||||
.name = "Base Accel",
|
||||
.active_mask = SENSOR_ACTIVE_S0,
|
||||
.chip = MOTIONSENSE_CHIP_BMI160,
|
||||
.type = MOTIONSENSE_TYPE_ACCEL,
|
||||
@@ -469,7 +470,7 @@ struct motion_sensor_t motion_sensors[] = {
|
||||
/* EC use accel for angle detection */
|
||||
[SENSOR_CONFIG_EC_S0] = {
|
||||
.odr = 10000 | ROUND_UP_FLAG,
|
||||
.ec_rate = 100,
|
||||
.ec_rate = 0,
|
||||
},
|
||||
/* Sensor off in S3/S5 */
|
||||
[SENSOR_CONFIG_EC_S3] = {
|
||||
@@ -483,8 +484,8 @@ struct motion_sensor_t motion_sensors[] = {
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{.name = "Base Gyro",
|
||||
[BASE_GYRO] = {
|
||||
.name = "Base Gyro",
|
||||
.active_mask = SENSOR_ACTIVE_S0,
|
||||
.chip = MOTIONSENSE_CHIP_BMI160,
|
||||
.type = MOTIONSENSE_TYPE_GYRO,
|
||||
@@ -523,9 +524,9 @@ struct motion_sensor_t motion_sensors[] = {
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
#ifdef BOARD_KEVIN
|
||||
{.name = "Lid Accel",
|
||||
[LID_ACCEL] = {
|
||||
.name = "Lid Accel",
|
||||
.active_mask = SENSOR_ACTIVE_S0,
|
||||
.chip = MOTIONSENSE_CHIP_BMA255,
|
||||
.type = MOTIONSENSE_TYPE_ACCEL,
|
||||
@@ -540,13 +541,13 @@ struct motion_sensor_t motion_sensors[] = {
|
||||
.config = {
|
||||
/* AP: by default use EC settings */
|
||||
[SENSOR_CONFIG_AP] = {
|
||||
.odr = 10000 | ROUND_UP_FLAG,
|
||||
.ec_rate = 100 * MSEC,
|
||||
.odr = 0,
|
||||
.ec_rate = 0,
|
||||
},
|
||||
/* EC use accel for angle detection */
|
||||
[SENSOR_CONFIG_EC_S0] = {
|
||||
.odr = 10000 | ROUND_UP_FLAG,
|
||||
.ec_rate = 100 * MSEC,
|
||||
.ec_rate = 0,
|
||||
},
|
||||
/* unused */
|
||||
[SENSOR_CONFIG_EC_S3] = {
|
||||
@@ -560,7 +561,8 @@ struct motion_sensor_t motion_sensors[] = {
|
||||
},
|
||||
},
|
||||
#else
|
||||
{.name = "Lid Accel",
|
||||
[LID_ACCEL] = {
|
||||
.name = "Lid Accel",
|
||||
.active_mask = SENSOR_ACTIVE_S0,
|
||||
.chip = MOTIONSENSE_CHIP_KX022,
|
||||
.type = MOTIONSENSE_TYPE_ACCEL,
|
||||
@@ -575,13 +577,13 @@ struct motion_sensor_t motion_sensors[] = {
|
||||
.config = {
|
||||
/* AP: by default use EC settings */
|
||||
[SENSOR_CONFIG_AP] = {
|
||||
.odr = 10000 | ROUND_UP_FLAG,
|
||||
.ec_rate = 100 * MSEC,
|
||||
.odr = 0,
|
||||
.ec_rate = 0,
|
||||
},
|
||||
/* EC use accel for angle detection */
|
||||
[SENSOR_CONFIG_EC_S0] = {
|
||||
.odr = 10000 | ROUND_UP_FLAG,
|
||||
.ec_rate = 100 * MSEC,
|
||||
.ec_rate = 0,
|
||||
},
|
||||
/* unused */
|
||||
[SENSOR_CONFIG_EC_S3] = {
|
||||
|
||||
@@ -80,6 +80,16 @@
|
||||
#define CONFIG_LID_ANGLE
|
||||
#define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL
|
||||
#define CONFIG_LID_ANGLE_SENSOR_LID LID_ACCEL
|
||||
/* FIFO size is in power of 2. */
|
||||
#define CONFIG_ACCEL_FIFO 256
|
||||
#define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO / 3)
|
||||
|
||||
/*
|
||||
* Sensor internal FIFO are not enabled, we need to poll at
|
||||
* every data point.
|
||||
*/
|
||||
#define CONFIG_ACCEL_FORCE_MODE_MASK \
|
||||
((1 << BASE_ACCEL) | (1 << BASE_GYRO) | (1 << LID_ACCEL))
|
||||
|
||||
/* USB PD config */
|
||||
#define CONFIG_CASE_CLOSED_DEBUG_EXTERNAL
|
||||
|
||||
Reference in New Issue
Block a user