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