diff options
author | Bhanu Prakash Maiya <bhanumaiya@google.com> | 2021-07-12 14:22:41 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-13 02:35:19 +0000 |
commit | 0e3c93846f4a901b5afa1c044dd00ab474489436 (patch) | |
tree | 526bece020577056f94e78aa1291e2f2faf25697 /baseboard | |
parent | e8c58c53f50f3ddd8c27ae05c74b23948c57007e (diff) | |
download | chrome-ec-0e3c93846f4a901b5afa1c044dd00ab474489436.tar.gz |
guybrush: Configure LID_ACCEL hardware without FIFO
1. This patch puts LID_ACCEL in forced mode.
2. This patch moves ACCEL_FIFO defines to baseboard
BRANCH=none
BUG=b:178213305
TEST=1. ectool motionsense
Motion sensing active
Sensor 0: 0 0 0
Sensor 1: 0 0 0
Sensor 2: -336 -1360 -16288
2. Lid accel data is showing up on ectool.
Signed-off-by: Bhanu Prakash Maiya <bhanumaiya@chromium.org>
Change-Id: If0eaa106478777a6266a77af2b47e91e354229ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3021753
Tested-by: Bhanu Prakash Maiya <bhanumaiya@google.com>
Auto-Submit: Bhanu Prakash Maiya <bhanumaiya@google.com>
Commit-Queue: Diana Z <dzigterman@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'baseboard')
-rw-r--r-- | baseboard/guybrush/baseboard.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/baseboard/guybrush/baseboard.h b/baseboard/guybrush/baseboard.h index e944b1b1ee..e3c9d5b25a 100644 --- a/baseboard/guybrush/baseboard.h +++ b/baseboard/guybrush/baseboard.h @@ -114,6 +114,18 @@ #define GMR_TABLET_MODE_GPIO_L GPIO_TABLET_MODE #define CONFIG_DYNAMIC_MOTION_SENSOR_COUNT +#ifdef HAS_TASK_MOTIONSENSE +/* Enable sensor fifo, must also define the _SIZE and _THRES */ +#define CONFIG_ACCEL_FIFO +/* FIFO size is a power of 2. */ +#define CONFIG_ACCEL_FIFO_SIZE 256 +/* Depends on how fast the AP boots and typical ODRs. */ +#define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO_SIZE / 3) +#endif + +/* Sensors without hardware FIFO are in forced mode */ +#define CONFIG_ACCEL_FORCE_MODE_MASK (1 << LID_ACCEL) + /* Battery Config */ #define CONFIG_BATTERY_PRESENT_GPIO GPIO_EC_BATT_PRES_ODL #define CONFIG_BATTERY_CUT_OFF |