diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2019-02-26 08:51:20 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-03-01 15:50:35 -0800 |
commit | ecde7fe66ceb8f5547b14a8d10ce7f5bf6446b84 (patch) | |
tree | 758b05b8b854f48fa3bdda4b1bef7cc134ec2d1d /common | |
parent | 39fefe9c75b7401cf4ca8ad4c8397496afb89a6a (diff) | |
download | chrome-ec-ecde7fe66ceb8f5547b14a8d10ce7f5bf6446b84.tar.gz |
motion: Add config variable to fill LPC sense data
Writing sense data in LPC area is required for:
- X86 host
- unit tests.
Add a CONFIG_ variable to make it explicit.
BUG=b:120346412
BRANCH=None
TEST=Buildall, emerge-* chromeos-ec
Change-Id: Ib3db6ec4e53cba3057162d300de943b6c86bfcfe
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1491913
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/motion_sense.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/common/motion_sense.c b/common/motion_sense.c index 970a151796..7b9d66204c 100644 --- a/common/motion_sense.c +++ b/common/motion_sense.c @@ -61,10 +61,6 @@ static int accel_disp; #define SENSOR_ACTIVE(_sensor) (sensor_active & (_sensor)->active_mask) -#if defined(CONFIG_HOSTCMD_X86) || defined(TEST_MOTION_LID) -#define UPDATE_HOST_MEM_MAP -#endif - /* * Adjustment in us to ec rate when calculating interrupt interval: * To be sure the EC will send an interrupt even if it finishes processing @@ -636,7 +632,7 @@ static inline void set_present(uint8_t *lpc_status) *lpc_status |= EC_MEMMAP_ACC_STATUS_PRESENCE_BIT; } -#ifdef UPDATE_HOST_MEM_MAP +#ifdef CONFIG_MOTION_FILL_LPC_SENSE_DATA /* Update/Write LPC data */ static inline void update_sense_data(uint8_t *lpc_status, int *psample_id) { @@ -935,7 +931,7 @@ void motion_sense_task(void *u) #ifdef CONFIG_ACCEL_FIFO timestamp_t ts_last_int; #endif -#ifdef UPDATE_HOST_MEM_MAP +#ifdef CONFIG_MOTION_FILL_LPC_SENSE_DATA int sample_id = 0; uint8_t *lpc_status; @@ -994,7 +990,7 @@ void motion_sense_task(void *u) CPRINTF("]\n"); } #endif -#ifdef UPDATE_HOST_MEM_MAP +#ifdef CONFIG_MOTION_FILL_LPC_SENSE_DATA update_sense_data(lpc_status, &sample_id); #endif |