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 depends on I2C || SPI 9 help 10 Enable SPI/I2C-based driver for LIS2DH, LIS3DH, LSM303DLHC, 11 LIS2DH12, LSM303AGR triaxial accelerometer sensors. 12 13if LIS2DH 14 15choice LIS2DH_TRIGGER_MODE 16 prompt "Trigger mode" 17 help 18 Specify the type of triggering to be used by the driver. 19 20config LIS2DH_TRIGGER_NONE 21 bool "No trigger" 22 23config LIS2DH_TRIGGER_GLOBAL_THREAD 24 bool "Use global thread" 25 depends on GPIO 26 select LIS2DH_TRIGGER 27 28config LIS2DH_TRIGGER_OWN_THREAD 29 bool "Use own thread" 30 depends on GPIO 31 select LIS2DH_TRIGGER 32 33endchoice 34 35config LIS2DH_TRIGGER 36 bool 37 38config LIS2DH_THREAD_PRIORITY 39 int "Thread priority" 40 depends on LIS2DH_TRIGGER_OWN_THREAD 41 default 10 42 help 43 Priority of thread used by the driver to handle interrupts. 44 45config LIS2DH_THREAD_STACK_SIZE 46 int "Thread stack size" 47 depends on LIS2DH_TRIGGER_OWN_THREAD 48 default 1024 49 help 50 Stack size of thread used by the driver to handle interrupts. 51 52choice 53 prompt "Acceleration measurement range" 54 default LIS2DH_ACCEL_RANGE_RUNTIME 55 help 56 Initial measurement full scale range for acceleration values. 57 58config LIS2DH_ACCEL_RANGE_RUNTIME 59 bool "Set at runtime" 60 61config LIS2DH_ACCEL_RANGE_2G 62 bool "+/-2g" 63 64config LIS2DH_ACCEL_RANGE_4G 65 bool "+/-4g" 66 67config LIS2DH_ACCEL_RANGE_8G 68 bool "+/-8g" 69 70config LIS2DH_ACCEL_RANGE_16G 71 bool "+/-16g" 72 73endchoice 74 75choice 76 prompt "Operation mode" 77 default LIS2DH_OPER_MODE_NORMAL 78 help 79 Choose between high resolution, normal or low power operation 80 mode for chip at init. 81 82config LIS2DH_OPER_MODE_HIGH_RES 83 bool "high resolution (12 bit)" 84 85config LIS2DH_OPER_MODE_NORMAL 86 bool "normal (10 bit)" 87 88config LIS2DH_OPER_MODE_LOW_POWER 89 bool "low power (8 bit)" 90 91endchoice 92 93choice 94 prompt "Output data rate frequency" 95 default LIS2DH_ODR_RUNTIME 96 help 97 Initial data rate frequency of acceleration data at initialization. 98 Supported values: 99 1Hz, 10Hz, 25Hz, 50Hz, 100Hz, 200Hz, 400Hz in all power modes 100 1620Hz, 5376Hz in low power mode only 101 1344Hz in normal power mode 102 103config LIS2DH_ODR_RUNTIME 104 bool "Set at runtime" 105 106config LIS2DH_ODR_1 107 bool "1Hz" 108 109config LIS2DH_ODR_2 110 bool "10Hz" 111 112config LIS2DH_ODR_3 113 bool "25Hz" 114 115config LIS2DH_ODR_4 116 bool "50Hz" 117 118config LIS2DH_ODR_5 119 bool "100Hz" 120 121config LIS2DH_ODR_6 122 bool "200Hz" 123 124config LIS2DH_ODR_7 125 bool "400Hz" 126 127config LIS2DH_ODR_8 128 bool "1.6KHz" 129 depends on LIS2DH_OPER_MODE_LOW_POWER 130 131config LIS2DH_ODR_9_NORMAL 132 bool "1.25KHz" 133 depends on LIS2DH_OPER_MODE_NORMAL || LIS2DH_OPER_MODE_HIGH_RES 134 135config LIS2DH_ODR_9_LOW 136 bool "5KHz" 137 depends on LIS2DH_OPER_MODE_LOW_POWER 138 139endchoice 140 141endif # LIS2DH 142