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	depends on I2C || SPI
9	select HAS_STMEMSC
10	select USE_STDC_LSM6DSO
11	help
12	  Enable driver for LSM6DSO accelerometer and gyroscope
13	  sensor.
14
15if LSM6DSO
16
17choice LSM6DSO_TRIGGER_MODE
18	prompt "Trigger mode"
19	help
20	  Specify the type of triggering to be used by the driver.
21
22config LSM6DSO_TRIGGER_NONE
23	bool "No trigger"
24
25config LSM6DSO_TRIGGER_GLOBAL_THREAD
26	bool "Use global thread"
27	depends on GPIO
28	select LSM6DSO_TRIGGER
29
30config LSM6DSO_TRIGGER_OWN_THREAD
31	bool "Use own thread"
32	depends on GPIO
33	select LSM6DSO_TRIGGER
34
35endchoice
36
37config LSM6DSO_TRIGGER
38	bool
39
40if LSM6DSO_TRIGGER
41
42config LSM6DSO_THREAD_PRIORITY
43	int "Thread priority"
44	depends on LSM6DSO_TRIGGER_OWN_THREAD
45	default 10
46	help
47	  Priority of thread used by the driver to handle interrupts.
48
49config LSM6DSO_THREAD_STACK_SIZE
50	int "Thread stack size"
51	depends on LSM6DSO_TRIGGER_OWN_THREAD
52	default 1024
53	help
54	  Stack size of thread used by the driver to handle interrupts.
55
56endif # LSM6DSO_TRIGGER
57
58config LSM6DSO_ENABLE_TEMP
59	bool "Enable temperature"
60	help
61	  Enable/disable temperature
62
63config LSM6DSO_SENSORHUB
64	bool "Enable I2C sensorhub feature"
65	help
66	  Enable/disable internal sensorhub. You can enable
67	  a maximum of two external sensors (if more than two are enabled
68	  the system would enumerate only the first two found)
69
70if LSM6DSO_SENSORHUB
71
72config LSM6DSO_EXT_LIS2MDL
73	bool "Enable LIS2MDL as external sensor"
74	default y
75
76config LSM6DSO_EXT_LPS22HH
77	bool "Enable LPS22HH as external sensor"
78	default y
79
80config LSM6DSO_EXT_HTS221
81	bool "Enable HTS221 as external sensor"
82
83config LSM6DSO_EXT_LPS22HB
84	bool "Enable LPS22HB as external sensor"
85
86endif # LSM6DSO_SENSORHUB
87
88menu "Attributes"
89
90config LSM6DSO_GYRO_FS
91	int "Gyroscope full-scale range"
92	default 0
93	help
94	  Specify the default gyroscope full-scale range.
95	  An X value for the config represents a range of +/- X degree per
96	  second. Valid values are:
97	  0:  Full Scale selected at runtime
98	  125:   +/- 125dps
99	  250:   +/- 250dps
100	  500:   +/- 500dps
101	  1000:  +/- 1000dps
102	  2000:  +/- 2000dps
103
104config LSM6DSO_GYRO_ODR
105	int "Gyroscope Output data rate frequency"
106	range 0 10
107	default 0
108	help
109	  Specify the default accelerometer output data rate expressed in
110	  samples per second (Hz).
111	  0: ODR selected at runtime
112	  1: 12.5Hz
113	  2: 26Hz
114	  3: 52Hz
115	  4: 104Hz
116	  5: 208Hz
117	  6: 416Hz
118	  7: 833Hz
119	  8: 1660Hz
120	  9: 3330Hz
121	  10: 6660Hz
122
123config LSM6DSO_ACCEL_FS
124	int "Accelerometer full-scale range"
125	default 0
126	help
127	  Specify the default accelerometer full-scale range.
128	  An X value for the config represents a range of +/- X G. Valid values
129	  are:
130	  0:  Full Scale selected at runtime
131	  2:  +/- 2g
132	  4:  +/- 4g
133	  8:  +/- 8g
134	  16: +/- 16g
135
136config LSM6DSO_ACCEL_ODR
137	int "Accelerometer Output data rate frequency"
138	range 0 10
139	default 0
140	help
141	  Specify the default accelerometer output data rate expressed in
142	  samples per second (Hz).
143	  0: ODR selected at runtime
144	  1: 12.5Hz
145	  2: 26Hz
146	  3: 52Hz
147	  4: 104Hz
148	  5: 208Hz
149	  6: 416Hz
150	  7: 833Hz
151	  8: 1660Hz
152	  9: 3330Hz
153	  10: 6660Hz
154endmenu
155
156endif # LSM6DSO
157