1# FXOS8700 6-axis accelerometer/magnetometer
2
3# Copyright (c) 2016 Freescale Semiconductor, Inc.
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig FXOS8700
7	bool "FXOS8700 accelerometer/magnetometer driver"
8	default y
9	depends on DT_HAS_NXP_FXOS8700_ENABLED
10	select I2C if $(dt_compat_on_bus,$(DT_COMPAT_NXP_FXOS8700),i2c)
11	select SPI if $(dt_compat_on_bus,$(DT_COMPAT_NXP_FXOS8700),spi)
12	help
13	  Enable driver for the FXOS8700 accelerometer/magnetometer.
14	  The driver also supports MMA8451Q, MMA8652FC and MMA8653FC
15	  accelerometers. If the driver is used with one of these
16	  accelerometers then the Accelerometer-only mode should be selected."
17
18if FXOS8700
19
20choice FXOS8700_MODE
21	prompt "Mode"
22	default FXOS8700_MODE_HYBRID
23
24config FXOS8700_MODE_ACCEL
25	bool "Accelerometer-only mode"
26
27config FXOS8700_MODE_MAGN
28	bool "Magnetometer-only mode"
29
30config FXOS8700_MODE_HYBRID
31	bool "Hybrid (accel+mag) mode"
32
33endchoice
34
35config FXOS8700_TEMP
36	bool "Temperature"
37	depends on FXOS8700_MODE_MAGN || FXOS8700_MODE_HYBRID
38	help
39	  Enable the temperature sensor. Note that the temperature sensor is
40	  uncalibrated and its output for a given temperature may vary from one
41	  device to the next.
42
43choice
44	prompt "Trigger mode"
45	default FXOS8700_TRIGGER_NONE
46
47config FXOS8700_TRIGGER_NONE
48	bool "No trigger"
49
50config FXOS8700_TRIGGER_GLOBAL_THREAD
51	bool "Use global thread"
52	depends on GPIO
53	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_NXP_FXOS8700),int1-gpios) ||\
54		   $(dt_compat_any_has_prop,$(DT_COMPAT_NXP_FXOS8700),int2-gpios)
55	select FXOS8700_TRIGGER
56
57config FXOS8700_TRIGGER_OWN_THREAD
58	bool "Use own thread"
59	select FXOS8700_TRIGGER
60
61endchoice
62
63config FXOS8700_TRIGGER
64	bool
65
66config FXOS8700_DRDY_INT1
67	bool "Data ready interrupt to INT1 pin"
68	depends on FXOS8700_TRIGGER
69	help
70	  Say Y to route data ready interrupt to INT1 pin. Say N to route to
71	  INT2 pin.
72
73if FXOS8700_TRIGGER
74
75config FXOS8700_THREAD_PRIORITY
76	int "Own thread priority"
77	depends on FXOS8700_TRIGGER_OWN_THREAD
78	default 10
79
80config FXOS8700_THREAD_STACK_SIZE
81	int "Own thread stack size"
82	depends on FXOS8700_TRIGGER_OWN_THREAD
83	default 1024
84
85menuconfig FXOS8700_PULSE
86	bool "Pulse detection"
87	help
88	  Enable pulse detection
89
90if FXOS8700_PULSE
91
92config FXOS8700_PULSE_INT1
93	bool "Pulse interrupt to INT1 pin"
94	help
95	  Say Y to route pulse interrupt to INT1 pin. Say N to route to INT2 pin.
96
97endif # FXOS8700_PULSE
98
99menuconfig FXOS8700_MOTION
100	bool "Motion detection"
101	help
102	  Enable motion detection
103
104config FXOS8700_MOTION_INT1
105	bool "Motion interrupt to INT1 pin"
106	depends on FXOS8700_MOTION
107	help
108	  Say Y to route motion interrupt to INT1 pin. Say N to route to INT2 pin.
109
110menuconfig FXOS8700_MAG_VECM
111	bool "Magnetic vector-magnitude detection"
112	help
113	  Enable magnetic vector-magnitude detection
114
115if FXOS8700_MAG_VECM
116
117config FXOS8700_MAG_VECM_INT1
118	bool "Magnetic vector-magnitude interrupt to INT1 pin"
119	help
120	  Say Y to route magnetic vector-magnitude interrupt to INT1 pin.
121	  Say N to route to INT2 pin.
122
123endif # FXOS8700_MAG_VECM
124
125endif # FXOS8700_TRIGGER
126
127endif # FXOS8700
128