From 6ff3be3921c19c00826252c685d9cb29d8c37bd4 Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Tue, 20 Oct 2020 16:52:49 -0700 Subject: motion: Use empty CONFIG_ variable to use IS_ENABLED() Split information in a boolean variable and another variable that contains a property. For instance, CONFIG_GESTURE_SENSOR_DOUBLE_TAP becomes: CONFIG_GESTURE_SENSOR_DOUBLE_TAP : boolean variable CONFIG_GESTURE_TAP_SENSOR : property that contains the sensor number. BUG=chromium:1140877 BRANCH=none TEST=buildall Signed-off-by: Gwendal Grignou Change-Id: I27ba462f8a12b14882104b9f983f2dc17f917314 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2488937 --- common/motion_sense.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/motion_sense.c') diff --git a/common/motion_sense.c b/common/motion_sense.c index e3b6e71943..d18128633a 100644 --- a/common/motion_sense.c +++ b/common/motion_sense.c @@ -717,7 +717,7 @@ static int motion_sense_process(struct motion_sensor_t *sensor, if (has_data_read) { #ifdef CONFIG_GESTURE_SW_DETECTION /* Run gesture recognition engine */ - if (sensor_num == CONFIG_GESTURE_SENSOR_DOUBLE_TAP) + if (sensor_num == CONFIG_GESTURE_TAP_SENSOR) gesture_calc(event); #endif #ifdef CONFIG_BODY_DETECTION @@ -1088,7 +1088,7 @@ static enum ec_status host_cmd_motion_sense(struct host_cmd_handler_args *args) if (args->version >= 3) { out->info_3.min_frequency = sensor->min_frequency; out->info_3.max_frequency = sensor->max_frequency; - out->info_3.fifo_max_event_count = MAX_FIFO_EVENT_COUNT; + out->info_3.fifo_max_event_count = CONFIG_ACCEL_FIFO_SIZE; args->response_size = sizeof(out->info_3); } if (args->version >= 4) { -- cgit v1.2.1