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	select FXOS8700_TRIGGER
53
54config FXOS8700_TRIGGER_OWN_THREAD
55	bool "Use own thread"
56	select FXOS8700_TRIGGER
57
58endchoice
59
60config FXOS8700_TRIGGER
61	bool
62
63config FXOS8700_DRDY_INT1
64	bool "Data ready interrupt to INT1 pin"
65	depends on FXOS8700_TRIGGER
66	help
67	  Say Y to route data ready interrupt to INT1 pin. Say N to route to
68	  INT2 pin.
69
70if FXOS8700_TRIGGER
71
72config FXOS8700_THREAD_PRIORITY
73	int "Own thread priority"
74	depends on FXOS8700_TRIGGER_OWN_THREAD
75	default 10
76
77config FXOS8700_THREAD_STACK_SIZE
78	int "Own thread stack size"
79	depends on FXOS8700_TRIGGER_OWN_THREAD
80	default 1024
81
82menuconfig FXOS8700_PULSE
83	bool "Pulse detection"
84	help
85	  Enable pulse detection
86
87if FXOS8700_PULSE
88
89config FXOS8700_PULSE_INT1
90	bool "Pulse interrupt to INT1 pin"
91	help
92	  Say Y to route pulse interrupt to INT1 pin. Say N to route to INT2 pin.
93
94endif # FXOS8700_PULSE
95
96menuconfig FXOS8700_MOTION
97	bool "Motion detection"
98	help
99	  Enable motion detection
100
101config FXOS8700_MOTION_INT1
102	bool "Motion interrupt to INT1 pin"
103	depends on FXOS8700_MOTION
104	help
105	  Say Y to route motion interrupt to INT1 pin. Say N to route to INT2 pin.
106
107menuconfig FXOS8700_MAG_VECM
108	bool "Magnetic vector-magnitude detection"
109	help
110	  Enable magnetic vector-magnitude detection
111
112if FXOS8700_MAG_VECM
113
114config FXOS8700_MAG_VECM_INT1
115	bool "Magnetic vector-magnitude interrupt to INT1 pin"
116	help
117	  Say Y to route magnetic vector-magnitude interrupt to INT1 pin.
118	  Say N to route to INT2 pin.
119
120endif # FXOS8700_MAG_VECM
121
122endif # FXOS8700_TRIGGER
123
124endif # FXOS8700
125