1# ST Microelectronics LSM6DSV16X 6-axis IMU sensor driver 2 3# Copyright (c) 2023 STMicroelectronics 4# SPDX-License-Identifier: Apache-2.0 5 6menuconfig LSM6DSV16X 7 bool "LSM6DSV16X I3C/I2C/SPI accelerometer and gyroscope Chip" 8 default y 9 depends on DT_HAS_ST_LSM6DSV16X_ENABLED 10 depends on ZEPHYR_HAL_ST_MODULE 11 select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSV16X),i2c) 12 select I3C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSV16X),i3c) 13 select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSV16X),spi) 14 select HAS_STMEMSC 15 select USE_STDC_LSM6DSV16X 16 select RTIO_WORKQ if SENSOR_ASYNC_API 17 help 18 Enable driver for LSM6DSV16X accelerometer and gyroscope 19 sensor. 20 21if LSM6DSV16X 22 23config LSM6DSV16X_STREAM 24 bool "Use hardware FIFO to stream data" 25 select LSM6DSV16X_TRIGGER 26 default y 27 depends on I2C_RTIO || SPI_RTIO || I3C_RTIO 28 depends on SENSOR_ASYNC_API 29 help 30 Use this config option to enable streaming sensor data via RTIO subsystem. 31 32choice LSM6DSV16X_TRIGGER_MODE 33 default LSM6DSV16X_TRIGGER_GLOBAL_THREAD if LSM6DSV16X_STREAM 34 default LSM6DSV16X_TRIGGER_NONE 35 prompt "Trigger mode" 36 help 37 Specify the type of triggering to be used by the driver. 38 39config LSM6DSV16X_TRIGGER_NONE 40 bool "No trigger" 41 42config LSM6DSV16X_TRIGGER_GLOBAL_THREAD 43 bool "Use global thread" 44 depends on GPIO || I3C 45 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_LSM6DSV16X),int1-gpios) ||\ 46 $(dt_compat_any_has_prop,$(DT_COMPAT_ST_LSM6DSV16X),int2-gpios) ||\ 47 $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSV16X),i3c) 48 select LSM6DSV16X_TRIGGER 49 50config LSM6DSV16X_TRIGGER_OWN_THREAD 51 bool "Use own thread" 52 depends on GPIO || I3C 53 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_LSM6DSV16X),int1-gpios) ||\ 54 $(dt_compat_any_has_prop,$(DT_COMPAT_ST_LSM6DSV16X),int2-gpios) ||\ 55 $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSV16X),i3c) 56 select LSM6DSV16X_TRIGGER 57 58endchoice 59 60config LSM6DSV16X_TRIGGER 61 bool 62 63if LSM6DSV16X_TRIGGER 64 65config LSM6DSV16X_THREAD_PRIORITY 66 int "Thread priority" 67 depends on LSM6DSV16X_TRIGGER_OWN_THREAD 68 default 10 69 help 70 Priority of thread used by the driver to handle interrupts. 71 72config LSM6DSV16X_THREAD_STACK_SIZE 73 int "Thread stack size" 74 depends on LSM6DSV16X_TRIGGER_OWN_THREAD 75 default 1024 76 help 77 Stack size of thread used by the driver to handle interrupts. 78 79endif # LSM6DSV16X_TRIGGER 80 81config LSM6DSV16X_ENABLE_TEMP 82 bool "Temperature" 83 help 84 Enable/disable temperature 85 86config LSM6DSV16X_SENSORHUB 87 bool "I2C sensorhub feature" 88 help 89 Enable/disable internal sensorhub. You can enable 90 a maximum of two external sensors (if more than two are enabled 91 the system would enumerate only the first two found) 92 93if LSM6DSV16X_SENSORHUB 94 95config LSM6DSV16X_EXT_LIS2MDL 96 bool "LIS2MDL as external sensor" 97 default y 98 99config LSM6DSV16X_EXT_LPS22HH 100 bool "LPS22HH as external sensor" 101 102config LSM6DSV16X_EXT_HTS221 103 bool "HTS221 as external sensor" 104 105config LSM6DSV16X_EXT_LPS22HB 106 bool "LPS22HB as external sensor" 107 108config LSM6DSV16X_EXT_LPS22DF 109 bool "LPS22DF as external sensor" 110 default y 111 112endif # LSM6DSV16X_SENSORHUB 113 114endif # LSM6DSV16X 115