diff options
author | Nick Vaccaro <nvaccaro@chromium.org> | 2017-04-25 19:09:03 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-05-18 21:05:23 -0700 |
commit | 9a0d0aa70d483be79c71a459dfd5f5e89da2638d (patch) | |
tree | 5e61d14a77ec938ce1508dbc61a271e0dfb15ee0 /board/glados | |
parent | d7eefeffb927cfd311d40c00ce817937eab4cb61 (diff) | |
download | chrome-ec-9a0d0aa70d483be79c71a459dfd5f5e89da2638d.tar.gz |
common: sensors: add extra sensor attributes
Adds min_frequency and max_frequency to struct motion_sensor_t.
New attributes min_frequency and max_frequency are now returned in
ectool's MOTIONSENSE_CMD_INFO response.
Incremented ectool's MOTIONSENSE_CMD_INFO version to version 3.
Add constants for MIN_FREQUENCY and MAX_FREQUENCY to each sensor's
header file.
BRANCH=none
BUG=chromium:615059
TEST=build/boot and verify MOTIONSENSE_CMD_INFO response on kevin,
make buildall -j passes.
Change-Id: I66db9715c122ef6bb4665ad5d086a9ecc9c7c93a
Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/482703
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/glados')
-rw-r--r-- | board/glados/board.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/board/glados/board.c b/board/glados/board.c index e77be19e93..dd492b17f1 100644 --- a/board/glados/board.c +++ b/board/glados/board.c @@ -497,6 +497,8 @@ struct motion_sensor_t motion_sensors[] = { .addr = BMI160_ADDR0, .rot_standard_ref = NULL, /* Identity matrix. */ .default_range = 2, /* g, enough for laptop. */ + .min_frequency = BMI160_ACCEL_MIN_FREQ, + .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { /* AP: by default use EC settings */ [SENSOR_CONFIG_AP] = { @@ -533,6 +535,8 @@ struct motion_sensor_t motion_sensors[] = { .addr = BMI160_ADDR0, .default_range = 1000, /* dps */ .rot_standard_ref = NULL, /* Identity Matrix. */ + .min_frequency = BMI160_GYRO_MIN_FREQ, + .max_frequency = BMI160_GYRO_MAX_FREQ, .config = { /* AP: by default shutdown all sensors */ [SENSOR_CONFIG_AP] = { @@ -569,6 +573,8 @@ struct motion_sensor_t motion_sensors[] = { .addr = KX022_ADDR1, .rot_standard_ref = NULL, /* Identity matrix. */ .default_range = 2, /* g, enough for laptop. */ + .min_frequency = KX022_ACCEL_MIN_FREQ, + .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { /* AP: by default use EC settings */ [SENSOR_CONFIG_AP] = { |