1# ICM42688-P Six-Axis Motion Tracking device configuration options
2#
3# Copyright (c) 2022 Intel Corporation
4# Copyright (c) 2024 Croxel Inc.
5#
6# SPDX-License-Identifier: Apache-2.0
7
8menuconfig ICM42688
9	bool "ICM42688 Six-Axis Motion Tracking Device"
10	default y
11	depends on DT_HAS_INVENSENSE_ICM42688_ENABLED
12	select SPI
13	select RTIO_WORKQ if SENSOR_ASYNC_API
14	help
15	  Enable driver for ICM42688 SPI-based six-axis motion tracking device.
16
17if ICM42688
18
19config EMUL_ICM42688
20	bool "Emulator for the ICM42688"
21	default y
22	depends on EMUL
23	help
24	  Enable the hardware emulator for the ICM42688. Doing so allows exercising
25	  sensor APIs for this IMU in native_sim and qemu.
26
27config ICM42688_DECODER
28	bool "ICM42688 decoder logic"
29	default y
30	select SENSOR_ASYNC_API
31	help
32	  Compile the ICM42688 decoder API which allows decoding raw data returned
33	  from the sensor.
34
35choice
36	prompt "Trigger mode"
37	default ICM42688_TRIGGER_NONE if ICM42688_STREAM
38	default ICM42688_TRIGGER_GLOBAL_THREAD
39	help
40	  Specify the type of triggering to be used by the driver
41
42config ICM42688_TRIGGER_NONE
43	bool "No trigger"
44
45config ICM42688_TRIGGER_GLOBAL_THREAD
46	bool "Use global thread"
47	depends on GPIO
48	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_INVENSENSE_ICM42688),int-gpios)
49	select ICM42688_TRIGGER
50
51config ICM42688_TRIGGER_OWN_THREAD
52	bool "Use own thread"
53	depends on GPIO
54	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_INVENSENSE_ICM42688),int-gpios)
55	select ICM42688_TRIGGER
56
57endchoice
58
59config ICM42688_STREAM
60	bool "Use hardware FIFO to stream data"
61	select ICM42688_TRIGGER
62	default y
63	depends on SPI_RTIO
64	depends on SENSOR_ASYNC_API
65	help
66	  Use this config option to enable streaming sensor data via RTIO subsystem.
67
68config ICM42688_TRIGGER
69	bool
70
71config ICM42688_THREAD_PRIORITY
72	int "Own thread priority"
73	depends on ICM42688_TRIGGER_OWN_THREAD
74	default 10
75	help
76	  The priority of the thread used for handling interrupts.
77
78config ICM42688_THREAD_STACK_SIZE
79	int "Own thread stack size"
80	depends on ICM42688_TRIGGER_OWN_THREAD
81	default 1024
82	help
83	  The thread stack size.
84
85endif # ICM42688
86