1# ST Microelectronics LSM6DSO 6-axis IMU sensor driver
2
3# Copyright (c) 2019 STMicroelectronics
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig LSM6DSO
7	bool "LSM6DSO I2C/SPI accelerometer and gyroscope Chip"
8	default y
9	depends on DT_HAS_ST_LSM6DSO_ENABLED || DT_HAS_ST_LSM6DSO32_ENABLED
10	depends on ZEPHYR_HAL_ST_MODULE
11	select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSO),i2c) || \
12		      $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSO32),i2c)
13	select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSO),spi) || \
14		      $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSO32),spi)
15	select HAS_STMEMSC
16	select USE_STDC_LSM6DSO
17	help
18	  Enable driver for LSM6DSO accelerometer and gyroscope
19	  sensor.
20
21if LSM6DSO
22
23choice LSM6DSO_TRIGGER_MODE
24	prompt "Trigger mode"
25	help
26	  Specify the type of triggering to be used by the driver.
27
28config LSM6DSO_TRIGGER_NONE
29	bool "No trigger"
30
31config LSM6DSO_TRIGGER_GLOBAL_THREAD
32	bool "Use global thread"
33	depends on GPIO
34	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_LSM6DSO),irq-gpios)
35	select LSM6DSO_TRIGGER
36
37config LSM6DSO_TRIGGER_OWN_THREAD
38	bool "Use own thread"
39	depends on GPIO
40	select LSM6DSO_TRIGGER
41
42endchoice
43
44config LSM6DSO_TRIGGER
45	bool
46
47if LSM6DSO_TRIGGER
48
49config LSM6DSO_THREAD_PRIORITY
50	int "Thread priority"
51	depends on LSM6DSO_TRIGGER_OWN_THREAD
52	default 10
53	help
54	  Priority of thread used by the driver to handle interrupts.
55
56config LSM6DSO_THREAD_STACK_SIZE
57	int "Thread stack size"
58	depends on LSM6DSO_TRIGGER_OWN_THREAD
59	default 1024
60	help
61	  Stack size of thread used by the driver to handle interrupts.
62
63endif # LSM6DSO_TRIGGER
64
65config LSM6DSO_ENABLE_TEMP
66	bool "Temperature"
67	help
68	  Enable/disable temperature
69
70config LSM6DSO_SENSORHUB
71	bool "I2C sensorhub feature"
72	help
73	  Enable/disable internal sensorhub. You can enable
74	  a maximum of two external sensors (if more than two are enabled
75	  the system would enumerate only the first two found)
76
77if LSM6DSO_SENSORHUB
78
79config LSM6DSO_EXT_LIS2MDL
80	bool "LIS2MDL as external sensor"
81	default y
82
83config LSM6DSO_EXT_LPS22HH
84	bool "LPS22HH as external sensor"
85	default y
86
87config LSM6DSO_EXT_HTS221
88	bool "HTS221 as external sensor"
89
90config LSM6DSO_EXT_LPS22HB
91	bool "LPS22HB as external sensor"
92
93endif # LSM6DSO_SENSORHUB
94
95endif # LSM6DSO
96