1# FXAS21002 3-axis gyroscope 2 3# Copyright (c) 2017, NXP 4# SPDX-License-Identifier: Apache-2.0 5 6menuconfig FXAS21002 7 bool "FXAS21002 gyroscope driver" 8 default y 9 depends on DT_HAS_NXP_FXAS21002_ENABLED 10 select I2C if $(dt_compat_on_bus,$(DT_COMPAT_NXP_FXAS21002),i2c) 11 select SPI if $(dt_compat_on_bus,$(DT_COMPAT_NXP_FXAS21002),spi) 12 help 13 Enable driver for the FXAS21002 gyroscope 14 15if FXAS21002 16 17config FXAS21002_WHOAMI 18 hex "WHOAMI value" 19 range 0x00 0xff 20 default 0xd7 21 help 22 The datasheet defines the value of the WHOAMI register, but some 23 pre-production devices can have a different value. It is unlikely you 24 should need to change this configuration option from the default. 25 26config FXAS21002_RANGE 27 int "Full scale range" 28 range 0 3 29 default 0 30 help 31 Selects the full scale range 32 0: +/-2000 dps (62.5 mdps/LSB) 33 1: +/-1000 dps (31.25 mdps/LSB) 34 2: +/-500 dps (15.625 mdps/LSB) 35 3: +/-250 dps (7.8125 mdps/LSB) 36 37config FXAS21002_DR 38 int "Output data rate" 39 range 0 7 40 default 3 41 help 42 Selects the output data rate 43 0: 800 Hz 44 1: 400 Hz 45 2: 200 Hz 46 3: 100 Hz 47 4: 50 Hz 48 5: 25 Hz 49 6: 12.5 Hz 50 7: 12.5 Hz 51 52choice 53 prompt "Trigger mode" 54 default FXAS21002_TRIGGER_NONE 55 56config FXAS21002_TRIGGER_NONE 57 bool "No trigger" 58 59config FXAS21002_TRIGGER_GLOBAL_THREAD 60 bool "Use global thread" 61 depends on GPIO 62 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_NXP_FXAS21002),int1-gpios) ||\ 63 $(dt_compat_any_has_prop,$(DT_COMPAT_NXP_FXAS21002),int2-gpios) 64 select FXAS21002_TRIGGER 65 66config FXAS21002_TRIGGER_OWN_THREAD 67 bool "Use own thread" 68 select FXAS21002_TRIGGER 69 70endchoice 71 72config FXAS21002_TRIGGER 73 bool 74 75if FXAS21002_TRIGGER 76 77config FXAS21002_DRDY_INT1 78 bool "Data ready interrupt to INT1 pin" 79 help 80 Say Y to route data ready interrupt to INT1 pin. Say N to route to 81 INT2 pin. 82 83config FXAS21002_THREAD_PRIORITY 84 int "Own thread priority" 85 depends on FXAS21002_TRIGGER_OWN_THREAD 86 default 10 87 88config FXAS21002_THREAD_STACK_SIZE 89 int "Own thread stack size" 90 depends on FXAS21002_TRIGGER_OWN_THREAD 91 default 1024 92 93endif # FXAS21002_TRIGGER 94 95endif # FXAS21002 96