summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/motion_sense.c3
-rw-r--r--util/config_allowed.txt1
-rw-r--r--zephyr/Kconfig.motionsense5
-rw-r--r--zephyr/shim/include/config_chip.h9
4 files changed, 16 insertions, 2 deletions
diff --git a/common/motion_sense.c b/common/motion_sense.c
index 4ab8afef59..d2a51fc2a4 100644
--- a/common/motion_sense.c
+++ b/common/motion_sense.c
@@ -777,7 +777,8 @@ static void check_and_queue_gestures(uint32_t *event)
"Inv_Portrait", "Inv_Landscape",
"Unknown"
};
- CPRINTS(mode[vector.activity_data.state]);
+ CPRINTS("%s",
+ mode[vector.activity_data.state]);
}
}
mutex_unlock(sensor->mutex);
diff --git a/util/config_allowed.txt b/util/config_allowed.txt
index 130e6e9421..d952250e8f 100644
--- a/util/config_allowed.txt
+++ b/util/config_allowed.txt
@@ -415,7 +415,6 @@ CONFIG_FW_INCLUDE_RO
CONFIG_FW_LIMITED_IMAGE
CONFIG_FW_PSTATE_OFF
CONFIG_FW_PSTATE_SIZE
-CONFIG_GESTURE_DETECTION
CONFIG_GESTURE_DETECTION_MASK
CONFIG_GESTURE_ORIENTATION
CONFIG_GESTURE_SAMPLING_INTERVAL_MS
diff --git a/zephyr/Kconfig.motionsense b/zephyr/Kconfig.motionsense
index fb08d0d6f5..137939f75c 100644
--- a/zephyr/Kconfig.motionsense
+++ b/zephyr/Kconfig.motionsense
@@ -179,6 +179,11 @@ config PLATFORM_EC_CONSOLE_CMD_ACCEL_SPOOF
endif # PLATFORM_EC_ACCEL_SPOOF_MODE
+config PLATFORM_EC_GESTURE_DETECTION
+ bool "Gesture detection"
+ help
+ Enable this to support gesture detection.
+
config PLATFORM_EC_GESTURE_HOST_DETECTION
bool "Gesture host detection"
help
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index e044b8dc66..2d110bbe84 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -9,6 +9,8 @@
#include <zephyr/devicetree.h>
#include <zephyr/toolchain.h>
+#define LID_ACCEL SENSOR_ID(DT_NODELABEL(lid_accel))
+
#define SENSOR_NODE DT_PATH(motionsense_sensor)
#define SENSOR_INFO_NODE DT_PATH(motionsense_sensor_info)
#define SENSOR_ALT_NODE DT_PATH(motionsense_sensor_alt)
@@ -2168,6 +2170,13 @@ extern char mock_jump_data[CONFIG_PLATFORM_EC_PRESERVED_END_OF_RAM_SIZE];
#define CONFIG_CMD_ACCEL_SPOOF
#endif
+#undef CONFIG_GESTURE_DETECTION
+#undef CONFIG_GESTURE_DETECTION_MASK
+#ifdef CONFIG_PLATFORM_EC_GESTURE_DETECTION
+#define CONFIG_GESTURE_DETECTION
+#define CONFIG_GESTURE_DETECTION_MASK BIT(CONFIG_BODY_DETECTION_SENSOR)
+#endif
+
#undef CONFIG_GESTURE_HOST_DETECTION
#ifdef CONFIG_PLATFORM_EC_GESTURE_HOST_DETECTION
#define CONFIG_GESTURE_HOST_DETECTION