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=smaug
BUG=none
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>
This commit is contained in:
Gwendal Grignou
2015-07-12 22:26:06 -07:00
committed by ChromeOS Commit Bot
parent e095bad64e
commit 2a929afefb
3 changed files with 26 additions and 10 deletions

View File

@@ -1825,7 +1825,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;
/*
@@ -1850,7 +1850,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 {