1# ST Microelectronics LSM6DSO 6-axis IMU sensor driver 2 3# Copyright (c) 2019 STMicroelectronics 4# SPDX-License-Identifier: Apache-2.0 5 6menuconfig LSM6DSO 7 bool "LSM6DSO I2C/SPI accelerometer and gyroscope Chip" 8 default y 9 depends on DT_HAS_ST_LSM6DSO_ENABLED || DT_HAS_ST_LSM6DSO32_ENABLED 10 depends on ZEPHYR_HAL_ST_MODULE 11 select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSO),i2c) || \ 12 $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSO32),i2c) 13 select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSO),spi) || \ 14 $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSO32),spi) 15 select HAS_STMEMSC 16 select USE_STDC_LSM6DSO 17 help 18 Enable driver for LSM6DSO accelerometer and gyroscope 19 sensor. 20 21if LSM6DSO 22 23choice LSM6DSO_TRIGGER_MODE 24 prompt "Trigger mode" 25 help 26 Specify the type of triggering to be used by the driver. 27 28config LSM6DSO_TRIGGER_NONE 29 bool "No trigger" 30 31config LSM6DSO_TRIGGER_GLOBAL_THREAD 32 bool "Use global thread" 33 depends on GPIO 34 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_LSM6DSO),irq-gpios) 35 select LSM6DSO_TRIGGER 36 37config LSM6DSO_TRIGGER_OWN_THREAD 38 bool "Use own thread" 39 depends on GPIO 40 select LSM6DSO_TRIGGER 41 42endchoice 43 44config LSM6DSO_TRIGGER 45 bool 46 47if LSM6DSO_TRIGGER 48 49config LSM6DSO_THREAD_PRIORITY 50 int "Thread priority" 51 depends on LSM6DSO_TRIGGER_OWN_THREAD 52 default 10 53 help 54 Priority of thread used by the driver to handle interrupts. 55 56config LSM6DSO_THREAD_STACK_SIZE 57 int "Thread stack size" 58 depends on LSM6DSO_TRIGGER_OWN_THREAD 59 default 1024 60 help 61 Stack size of thread used by the driver to handle interrupts. 62 63config LSM6DSO_TILT 64 bool "Tilt detection" 65 help 66 Enable tilt detection 67 68config LSM6DSO_TAP 69 bool "Tap and Tap-Tap detection" 70 help 71 Enable tap (single/double) detection 72 73endif # LSM6DSO_TRIGGER 74 75config LSM6DSO_ENABLE_TEMP 76 bool "Temperature" 77 help 78 Enable/disable temperature 79 80config LSM6DSO_SENSORHUB 81 bool "I2C sensorhub feature" 82 help 83 Enable/disable internal sensorhub. You can enable 84 a maximum of two external sensors (if more than two are enabled 85 the system would enumerate only the first two found) 86 87if LSM6DSO_SENSORHUB 88 89config LSM6DSO_EXT_LIS2MDL 90 bool "LIS2MDL as external sensor" 91 default y 92 93config LSM6DSO_EXT_LPS22HH 94 bool "LPS22HH as external sensor" 95 default y 96 97config LSM6DSO_EXT_HTS221 98 bool "HTS221 as external sensor" 99 100config LSM6DSO_EXT_LPS22HB 101 bool "LPS22HB as external sensor" 102 103endif # LSM6DSO_SENSORHUB 104 105endif # LSM6DSO 106