From 0a2ce40cac360e5d32a3c659223b6f71e5365fee Mon Sep 17 00:00:00 2001 From: Mary Ruthven Date: Tue, 9 Nov 2021 20:10:00 -0600 Subject: Revert "common: sensors: add extra sensor attributes" This reverts commit 9a0d0aa70d483be79c71a459dfd5f5e89da2638d. BUG=b:200823466 TEST=make buildall -j Change-Id: Icb8f22f0cf3211141ac04a967af298a8b2f090e1 Signed-off-by: Mary Ruthven Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3273463 Reviewed-by: Vadim Sukhomlinov --- include/common.h | 3 --- include/config.h | 8 -------- include/ec_commands.h | 23 +---------------------- include/util.h | 3 +++ 4 files changed, 4 insertions(+), 33 deletions(-) diff --git a/include/common.h b/include/common.h index def017e214..9e16f9c462 100644 --- a/include/common.h +++ b/include/common.h @@ -333,9 +333,6 @@ enum ec_error_list { #define __stdlib_compat #endif /* TEST_FUZZ */ -/* find the most significant bit. Not defined in n == 0. */ -#define __fls(n) (31 - __builtin_clz(n)) - /* * __cfg_select(CONFIG_NAME, EMPTY, OTHERWISE) is a macro used for * defining other macros which conditionally select code based on a diff --git a/include/config.h b/include/config.h index 128c0dc88b..97702cb231 100644 --- a/include/config.h +++ b/include/config.h @@ -1458,9 +1458,6 @@ /* Usually, EC capable of sensor speeds up to 200000 mHz */ #define CONFIG_EC_MAX_SENSOR_FREQ_DEFAULT_MILLIHZ 200000 -/* Maximal EC sampling rate */ -#undef CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ - /* * Allow board to override the feature bitmap provided through host command * and ACPI. @@ -4597,11 +4594,6 @@ #error "CONFIG_AUX_TIMER_PERIOD_MS must be at least 2x HOOK_TICK_INTERVAL_MS" #endif -#ifndef CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ -#define CONFIG_EC_MAX_SENSOR_FREQ_MILLIHZ \ - CONFIG_EC_MAX_SENSOR_FREQ_DEFAULT_MILLIHZ -#endif - /* Enable BMI160 secondary port if needed. */ #if defined(CONFIG_MAG_BMI160_BMM150) || \ defined(CONFIG_MAG_BMI160_LIS2MDL) diff --git a/include/ec_commands.h b/include/ec_commands.h index f89a3ca77d..8b50508bad 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -2597,7 +2597,7 @@ struct ec_params_motion_sense { */ struct __ec_todo_unpacked { uint8_t sensor_num; - } info, info_3, data, fifo_flush, list_activities; + } info, data, fifo_flush, list_activities; /* * Used for MOTIONSENSE_CMD_PERFORM_CALIB: @@ -2771,27 +2771,6 @@ struct ec_response_motion_sense { uint8_t chip; } info; - /* Used for MOTIONSENSE_CMD_INFO version 3 */ - struct __ec_todo_unpacked { - /* Should be element of enum motionsensor_type. */ - uint8_t type; - - /* Should be element of enum motionsensor_location. */ - uint8_t location; - - /* Should be element of enum motionsensor_chip. */ - uint8_t chip; - - /* Minimum sensor sampling frequency */ - uint32_t min_frequency; - - /* Maximum sensor sampling frequency */ - uint32_t max_frequency; - - /* Max number of sensor events that could be in fifo */ - uint32_t fifo_max_event_count; - } info_3; - /* Used for MOTIONSENSE_CMD_DATA */ struct ec_response_motion_sensor_data data; diff --git a/include/util.h b/include/util.h index be9c62e935..d05869305d 100644 --- a/include/util.h +++ b/include/util.h @@ -52,6 +52,9 @@ extern "C" { /* True of x is a power of two */ #define POWER_OF_TWO(x) ((x) && !((x) & ((x) - 1))) +/* find the most significant bit. Not defined in n == 0. */ +#define __fls(n) (31 - __builtin_clz(n)) + /* * macros for integer division with various rounding variants * default integer division rounds down. -- cgit v1.2.1