diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2015-07-12 22:26:06 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2016-08-25 20:56:33 +0000 |
commit | 0fc45af0f5376c55a9d0dbc7aa1b2c0d0dc485b7 (patch) | |
tree | 9ed8460d983f878ad3d85030b4f1ff58882c44ce | |
parent | bbf619353b9359ee90dc607fc6cf608df95be9c9 (diff) | |
download | chrome-ec-0fc45af0f5376c55a9d0dbc7aa1b2c0d0dc485b7.tar.gz |
UPSTREAM: motion: Fix for FIFO support and BMI150
- Compass was not set properly if default config is set to
disable it (frequency == 0). We were trying to set it up
while stuck in debug mode.
- BMI150 FIFO collects sensor info even when suspended.
Ask FIFO to ommit suspended sensors.
- FIx compliation issue on nucleo-f411 board, where
MKBP is not enabled.
- Fix location of __packed arguement.
BRANCH=samus
BUG=b:27849483
TEST=Check the compass is back with accelinfo,
FIFO is not filled with garbage with fiforead.
Check by echoing in in_accel_z_calibbias that the format
of MOTIONSENSE_CMD_SENSOR_OFFSET has not changed.
Change-Id: I7ebec12a14a74b8385b9f9532562a1fd0213f4d7
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/284929
Reviewed-by: Alec Berg <alecaberg@chromium.org>
(cherry picked from commit 2a929afefbc0ec387545646b107309fea2fd82bb)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/370505
-rw-r--r-- | common/motion_sense.c | 2 | ||||
-rw-r--r-- | include/ec_commands.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/common/motion_sense.c b/common/motion_sense.c index 0fc71d1677..57a4bd26bb 100644 --- a/common/motion_sense.c +++ b/common/motion_sense.c @@ -467,7 +467,9 @@ void motion_sense_task(void) motion_sense_insert_timestamp(); fifo_flush_needed = 0; ts_last_int = ts_end_task; +#ifdef CONFIG_MKBP_EVENT mkbp_send_event(EC_MKBP_EVENT_SENSOR_FIFO); +#endif } #endif /* Delay appropriately to keep sampling time consistent. */ diff --git a/include/ec_commands.h b/include/ec_commands.h index ab37a9d85d..28c491d060 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -1577,7 +1577,7 @@ struct ec_params_motion_sense { } ec_rate, sensor_odr, sensor_range; /* Used for MOTIONSENSE_CMD_SENSOR_OFFSET */ - struct __attribute__((__packed__)) { + struct { uint8_t sensor_num; /* @@ -1602,7 +1602,7 @@ struct ec_params_motion_sense { * Gyro: 1/1024 deg/s */ int16_t offset[3]; - } sensor_offset; + } __packed sensor_offset; /* Used for MOTIONSENSE_CMD_FIFO_INFO */ struct { |