1# LSM6DSL accelerometer and gyroscope sensor configuration 2# options 3 4# Copyright (c) 2017 Linaro Limited 5# SPDX-License-Identifier: Apache-2.0 6 7menuconfig LSM6DSL 8 bool "LSM6DSL I2C/SPI accelerometer and gyroscope Chip" 9 default y 10 depends on DT_HAS_ST_LSM6DSL_ENABLED 11 select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSL),i2c) 12 select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSL),spi) 13 help 14 Enable driver for LSM6DSL accelerometer and gyroscope 15 sensor. 16 17if LSM6DSL 18 19choice LSM6DSL_TRIGGER_MODE 20 prompt "Trigger mode" 21 help 22 Specify the type of triggering to be used by the driver. 23 24config LSM6DSL_TRIGGER_NONE 25 bool "No trigger" 26 27config LSM6DSL_TRIGGER_GLOBAL_THREAD 28 bool "Use global thread" 29 depends on GPIO 30 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_LSM6DSL),irq-gpios) 31 select LSM6DSL_TRIGGER 32 33config LSM6DSL_TRIGGER_OWN_THREAD 34 bool "Use own thread" 35 depends on GPIO 36 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_LSM6DSL),irq-gpios) 37 select LSM6DSL_TRIGGER 38 39endchoice 40 41config LSM6DSL_TRIGGER 42 bool 43 44config LSM6DSL_THREAD_PRIORITY 45 int "Thread priority" 46 depends on LSM6DSL_TRIGGER_OWN_THREAD 47 default 10 48 help 49 Priority of thread used by the driver to handle interrupts. 50 51config LSM6DSL_THREAD_STACK_SIZE 52 int "Thread stack size" 53 depends on LSM6DSL_TRIGGER_OWN_THREAD 54 default 1024 55 help 56 Stack size of thread used by the driver to handle interrupts. 57 58config LSM6DSL_ENABLE_TEMP 59 bool "Temperature" 60 help 61 Enable/disable temperature 62 63config LSM6DSL_SENSORHUB 64 bool "I2C sensorhub feature" 65 help 66 Enable/disable internal sensorhub 67 68choice LSM6DSL_EXTERNAL_SENSOR_0 69 prompt "External sensor 0" 70 depends on LSM6DSL_SENSORHUB 71 help 72 Choose the external sensor 0 connected to LSM6DS3. 73 74config LSM6DSL_EXT0_LIS2MDL 75 bool "LIS2MDL" 76 77config LSM6DSL_EXT0_LIS3MDL 78 bool "LIS3MDL" 79 80config LSM6DSL_EXT0_LPS22HB 81 bool "LPS22HB" 82 83endchoice 84 85menu "Attributes" 86 87config LSM6DSL_GYRO_FS 88 int "Gyroscope full-scale range" 89 default 0 90 help 91 Specify the default gyroscope full-scale range. 92 An X value for the config represents a range of +/- X degree per 93 second. Valid values are: 94 0: Full Scale selected at runtime 95 125: +/- 125dps 96 250: +/- 250dps 97 500: +/- 500dps 98 1000: +/- 1000dps 99 2000: +/- 2000dps 100 101config LSM6DSL_GYRO_ODR 102 int "Gyroscope Output data rate frequency" 103 range 0 10 104 default 0 105 help 106 Specify the default accelerometer output data rate expressed in 107 samples per second (Hz). 108 0: ODR selected at runtime 109 1: 12.5Hz 110 2: 26Hz 111 3: 52Hz 112 4: 104Hz 113 5: 208Hz 114 6: 416Hz 115 7: 833Hz 116 8: 1660Hz 117 9: 3330Hz 118 10: 6660Hz 119 120config LSM6DSL_ACCEL_FS 121 int "Accelerometer full-scale range" 122 default 0 123 help 124 Specify the default accelerometer full-scale range. 125 An X value for the config represents a range of +/- X G. Valid values 126 are: 127 0: Full Scale selected at runtime 128 2: +/- 2g 129 4: +/- 4g 130 8: +/- 8g 131 16: +/- 16g 132 133config LSM6DSL_ACCEL_ODR 134 int "Accelerometer Output data rate frequency" 135 range 0 11 136 default 0 137 help 138 Specify the default accelerometer output data rate expressed in 139 samples per second (Hz). 140 0: ODR selected at runtime 141 1: 12.5Hz 142 2: 26Hz 143 3: 52Hz 144 4: 104Hz 145 5: 208Hz 146 6: 416Hz 147 7: 833Hz 148 8: 1666Hz 149 9: 3332Hz 150 10: 6664Hz 151 11: 1.6Hz 152endmenu 153 154endif # LSM6DSL 155