1# ADXL362 Three-Axis Digital Accelerometers
2
3# Copyright (c) 2017 IpTronix S.r.l.
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig ADXL362
7	bool "ADXL362 sensor"
8	default y
9	depends on DT_HAS_ADI_ADXL362_ENABLED
10	select SPI
11	help
12	  Enable driver for ADXL362 Three-Axis Digital Accelerometers.
13
14if ADXL362
15
16choice
17	prompt "Accelerometer range setting"
18	default ADXL362_ACCEL_RANGE_RUNTIME
19
20config ADXL362_ACCEL_RANGE_RUNTIME
21	bool "Set at runtime."
22
23config ADXL362_ACCEL_RANGE_2G
24	bool "2G"
25
26config ADXL362_ACCEL_RANGE_4G
27	bool "4G"
28
29config ADXL362_ACCEL_RANGE_8G
30	bool "8G"
31
32endchoice
33
34choice
35	prompt "Accelerometer sampling frequency."
36	default ADXL362_ACCEL_ODR_RUNTIME
37
38config ADXL362_ACCEL_ODR_RUNTIME
39	bool "Set at runtime."
40
41config ADXL362_ACCEL_ODR_12_5
42	bool "12.5 Hz"
43
44config ADXL362_ACCEL_ODR_25
45	bool "25 Hz"
46
47config ADXL362_ACCEL_ODR_50
48	bool "50 Hz"
49
50config ADXL362_ACCEL_ODR_100
51	bool "100 Hz"
52
53config ADXL362_ACCEL_ODR_200
54	bool "200 Hz"
55
56config ADXL362_ACCEL_ODR_400
57	bool "400 Hz"
58
59endchoice
60
61choice
62	prompt "Trigger mode"
63	default ADXL362_TRIGGER_NONE
64	help
65	  Specify the type of triggering used by the driver.
66
67config ADXL362_TRIGGER_NONE
68	bool "No trigger"
69
70config ADXL362_TRIGGER_GLOBAL_THREAD
71	bool "Use global thread"
72	depends on GPIO
73	select ADXL362_TRIGGER
74
75config ADXL362_TRIGGER_OWN_THREAD
76	bool "Use own thread"
77	depends on GPIO
78	select ADXL362_TRIGGER
79
80endchoice
81
82config ADXL362_TRIGGER
83	bool
84
85config ADXL362_THREAD_PRIORITY
86	int "Thread priority"
87	depends on ADXL362_TRIGGER_OWN_THREAD && ADXL362_TRIGGER
88	default 10
89	help
90	  Priority of thread used by the driver to handle interrupts.
91
92config ADXL362_THREAD_STACK_SIZE
93	int "Thread stack size"
94	depends on ADXL362_TRIGGER_OWN_THREAD && ADXL362_TRIGGER
95	default 1024
96	help
97	  Stack size of thread used by the driver to handle interrupts.
98
99config ADXL362_ACTIVITY_THRESHOLD
100	int "Upper threshold value"
101	default 1000
102	help
103	  Unsigned value that the adxl362 samples are
104	  compared to in activity trigger mode.
105
106config ADXL362_ACTIVITY_TIME
107       int "Upper threshold time"
108       default 1
109       help
110         8 bit value written to the activity timer register
111         0 to 254, seconds is this value div by ODR
112
113config ADXL362_INACTIVITY_THRESHOLD
114	int "Lower threshold value"
115	default 100
116	help
117	  Unsigned value that the adxl362 samples are
118	  compared to in inactivity trigger mode.
119
120config ADXL362_INACTIVITY_TIME
121  int "Lower threshold time"
122  default 1
123  help
124    16 bit value written to the activity timer register
125    0 to 65535, seconds is this value div by ODR
126
127config ADXL362_INTERRUPT_MODE
128	int "Activity and inactivity interrupt mode"
129	default 0
130	help
131	  Unsigned value that sets the ADXL362 in different
132	  interrupt modes.
133	  0 - Default mode
134	  1 - Linked mode
135	  3 - Loop mode
136
137config ADXL362_ABS_REF_MODE
138	int "Absolute or referenced interrupt"
139	default 0
140	help
141	  Unsigned value that sets the ADXL362 interrupt
142	  mode in either absolute or referenced mode.
143	  0 - Absolute mode
144	  1 - Referenced mode
145
146endif # ADXL362
147