From 8b37b17df0b8946763b1da984c64c51418a6b381 Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Wed, 8 Sep 2021 10:20:58 -0700 Subject: driver: bmi: Merge list_activities in common code Put list_activities in common code, as it is used by both BMI160 and BMI260 driver. Fixes cb3771973de ("Coachz: MotionSensor: Avoid redefine gesture function list_activites") Fixes fc298a0ada0 ("driver: bmi260: integrate body detection") BUG=b:195908820 BRANCH=trogdor TEST=buildall Change-Id: I05591954c825802502328c842b03e8934c497f08 Signed-off-by: Gwendal Grignou Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3150056 Reviewed-by: Daisuke Nojiri --- driver/accelgyro_bmi160.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'driver/accelgyro_bmi160.c') diff --git a/driver/accelgyro_bmi160.c b/driver/accelgyro_bmi160.c index 78958ee5c9..f92f61d181 100644 --- a/driver/accelgyro_bmi160.c +++ b/driver/accelgyro_bmi160.c @@ -385,16 +385,6 @@ static int manage_activity(const struct motion_sensor_t *s, } return ret; } - -static int list_activities(const struct motion_sensor_t *s, - uint32_t *enabled, - uint32_t *disabled) -{ - struct bmi_drv_data_t *data = BMI_GET_DATA(s); - *enabled = data->enabled_activities; - *disabled = data->disabled_activities; - return EC_RES_SUCCESS; -} #endif static __maybe_unused int config_interrupt(const struct motion_sensor_t *s) @@ -761,7 +751,7 @@ const struct accelgyro_drv bmi160_drv = { #endif #ifdef CONFIG_GESTURE_HOST_DETECTION .manage_activity = manage_activity, - .list_activities = list_activities, + .list_activities = bmi_list_activities, #endif #ifdef CONFIG_BODY_DETECTION .get_rms_noise = bmi_get_rms_noise, -- cgit v1.2.1