diff options
author | Ben Chen <ben.chen2@quanta.corp-partner.google.com> | 2021-04-15 16:53:14 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-19 01:55:34 +0000 |
commit | 05884b519cd040f2dce139dc533b1e82008f92a9 (patch) | |
tree | 1dc22244398a1ab54d1d362bc47ad85d2330c442 /board/voxel | |
parent | fba31a3ae244b6dfd18e4b59508aa45387161d81 (diff) | |
download | chrome-ec-05884b519cd040f2dce139dc533b1e82008f92a9.tar.gz |
voema: support kx022/bma255 with ssfc bits map
config kx022 or bma255 motion sensor by ssfc bits map,
and rename volteer ssfc bits map.
BUG=b:178447173
BRANCH=main
TEST=Using ectool 'motionsense' verified lid angle now goes
from 0 to 360 and swtiches to tablet mode after crossing 200
threshold on re-work kx022/bma255 DUT.
Change-Id: I2901b0cc980e50324eb4f20d073c5f3a4c3f80e3
Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2825719
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'board/voxel')
-rw-r--r-- | board/voxel/sensors.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/board/voxel/sensors.c b/board/voxel/sensors.c index e9d3545284..abb0ced9ac 100644 --- a/board/voxel/sensors.c +++ b/board/voxel/sensors.c @@ -207,14 +207,14 @@ unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); static void board_sensors_init(void) { if (ec_cfg_has_tabletmode()) { - if (get_cbi_ssfc_base_sensor() == SSFC_SENSOR_ICM426XX) { + if (get_cbi_ssfc_base_sensor() == SSFC_SENSOR_BASE_ICM426XX) { motion_sensors[BASE_ACCEL] = icm426xx_base_accel; motion_sensors[BASE_GYRO] = icm426xx_base_gyro; ccprints("BASE GYRO is ICM426XX"); } else ccprints("BASE GYRO is BMI160"); - if (get_cbi_ssfc_lid_sensor() == SSFC_SENSOR_KX022) { + if (get_cbi_ssfc_lid_sensor() == SSFC_SENSOR_LID_KX022) { motion_sensors[LID_ACCEL] = kx022_lid_accel; ccprints("LID_ACCEL is KX022"); } else @@ -236,10 +236,10 @@ DECLARE_HOOK(HOOK_INIT, board_sensors_init, HOOK_PRIO_DEFAULT); void motion_interrupt(enum gpio_signal signal) { switch (get_cbi_ssfc_base_sensor()) { - case SSFC_SENSOR_ICM426XX: + case SSFC_SENSOR_BASE_ICM426XX: icm426xx_interrupt(signal); break; - case SSFC_SENSOR_BMI160: + case SSFC_SENSOR_BASE_BMI160: default: bmi160_interrupt(signal); break; |