1# LIS2DH Three Axis Accelerometer configuration options
2
3# Copyright (c) 2017 Intel Corporation
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig LIS2DH
7	bool "LIS2DH Three Axis Accelerometer"
8	default y
9	depends on DT_HAS_ST_LIS2DH_ENABLED
10	select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DH),i2c)
11	select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DH),spi)
12	help
13	  Enable SPI/I2C-based driver for LIS2DH, LIS3DH, LSM303DLHC,
14	  LIS2DH12, LSM303AGR triaxial accelerometer sensors.
15
16if LIS2DH
17
18choice LIS2DH_TRIGGER_MODE
19	prompt "Trigger mode"
20	help
21	  Specify the type of triggering to be used by the driver.
22
23config LIS2DH_TRIGGER_NONE
24	bool "No trigger"
25
26config LIS2DH_TRIGGER_GLOBAL_THREAD
27	bool "Use global thread"
28	depends on GPIO
29	select LIS2DH_TRIGGER
30
31config LIS2DH_TRIGGER_OWN_THREAD
32	bool "Use own thread"
33	depends on GPIO
34	select LIS2DH_TRIGGER
35
36endchoice
37
38config LIS2DH_TRIGGER
39	bool
40
41config LIS2DH_THREAD_PRIORITY
42	int "Thread priority"
43	depends on LIS2DH_TRIGGER_OWN_THREAD
44	default 10
45	help
46	  Priority of thread used by the driver to handle interrupts.
47
48config LIS2DH_THREAD_STACK_SIZE
49	int "Thread stack size"
50	depends on LIS2DH_TRIGGER_OWN_THREAD
51	default 1024
52	help
53	  Stack size of thread used by the driver to handle interrupts.
54
55choice LIS2DH_ACCEL_RANGE
56	prompt "Acceleration measurement range"
57	default LIS2DH_ACCEL_RANGE_RUNTIME
58	help
59	  Initial measurement full scale range for acceleration values.
60
61config LIS2DH_ACCEL_RANGE_RUNTIME
62	bool "Set at runtime"
63
64config LIS2DH_ACCEL_RANGE_2G
65	bool "+/-2g"
66
67config LIS2DH_ACCEL_RANGE_4G
68	bool "+/-4g"
69
70config LIS2DH_ACCEL_RANGE_8G
71	bool "+/-8g"
72
73config LIS2DH_ACCEL_RANGE_16G
74	bool "+/-16g"
75
76endchoice
77
78choice LIS2DH_OPER_MODE
79	prompt "Operation mode"
80	default LIS2DH_OPER_MODE_NORMAL
81	help
82	  Choose between high resolution, normal or low power operation
83	  mode for chip at init.
84
85config LIS2DH_OPER_MODE_HIGH_RES
86	bool "high resolution (12 bit)"
87
88config LIS2DH_OPER_MODE_NORMAL
89	bool "normal (10 bit)"
90
91config LIS2DH_OPER_MODE_LOW_POWER
92	bool "low power (8 bit)"
93
94endchoice
95
96choice LIS2DH_ODR
97	prompt "Output data rate frequency"
98	default LIS2DH_ODR_RUNTIME
99	help
100	  Initial data rate frequency of acceleration data at initialization.
101	  Supported values:
102	  1Hz, 10Hz, 25Hz, 50Hz, 100Hz, 200Hz, 400Hz in all power modes
103	  1620Hz, 5376Hz in low power mode only
104	  1344Hz in normal power mode
105
106config LIS2DH_ODR_RUNTIME
107	bool "Set at runtime"
108
109config LIS2DH_ODR_1
110	bool "1Hz"
111
112config LIS2DH_ODR_2
113	bool "10Hz"
114
115config LIS2DH_ODR_3
116	bool "25Hz"
117
118config LIS2DH_ODR_4
119	bool "50Hz"
120
121config LIS2DH_ODR_5
122	bool "100Hz"
123
124config LIS2DH_ODR_6
125	bool "200Hz"
126
127config LIS2DH_ODR_7
128	bool "400Hz"
129
130config LIS2DH_ODR_8
131	bool "1.6KHz"
132	depends on LIS2DH_OPER_MODE_LOW_POWER
133
134config LIS2DH_ODR_9_NORMAL
135	bool "1.25KHz"
136	depends on LIS2DH_OPER_MODE_NORMAL || LIS2DH_OPER_MODE_HIGH_RES
137
138config LIS2DH_ODR_9_LOW
139	bool "5KHz"
140	depends on LIS2DH_OPER_MODE_LOW_POWER
141
142endchoice
143
144config LIS2DH_ACCEL_HP_FILTERS
145	bool "Set High Pass filters for AOI functions on interrupt lines"
146
147config LIS2DH_BLOCK_DATA_UPDATE
148	bool "Output registers not updated until MSB and LSB read"
149
150config LIS2DH_MEASURE_TEMPERATURE
151	bool "Temperature measurements"
152	select LIS2DH_BLOCK_DATA_UPDATE
153	help
154	  The temperature sensor is most suitable for measuring
155	  relative temperature. For example, it is X degrees C
156	  cooler or warmer.
157	  Each chip has an offset.  This offset must be applied
158	  to the result. The offset can be obtained by comparing the
159	  the reported temperature to a reference.
160	  This option does not apply to the LSM330DLHC.
161
162endif # LIS2DH
163