1# ST Microelectronics LIS2DW12 3-axis accelerometer driver 2 3# Copyright (c) 2019 STMicroelectronics 4# SPDX-License-Identifier: Apache-2.0 5 6menuconfig LIS2DW12 7 bool "LIS2DW12 I2C/SPI accelerometer sensor driver" 8 default y 9 depends on DT_HAS_ST_LIS2DW12_ENABLED 10 select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DW12),i2c) 11 select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DW12),spi) 12 select HAS_STMEMSC 13 select USE_STDC_LIS2DW12 14 help 15 Enable driver for LIS2DW12 accelerometer sensor driver 16 17if LIS2DW12 18 19choice LIS2DW12_TRIGGER_MODE 20 prompt "Trigger mode" 21 help 22 Specify the type of triggering to be used by the driver. 23 24config LIS2DW12_TRIGGER_NONE 25 bool "No trigger" 26 27config LIS2DW12_TRIGGER_GLOBAL_THREAD 28 bool "Use global thread" 29 depends on GPIO 30 select LIS2DW12_TRIGGER 31 32config LIS2DW12_TRIGGER_OWN_THREAD 33 bool "Use own thread" 34 depends on GPIO 35 select LIS2DW12_TRIGGER 36 37endchoice 38 39config LIS2DW12_TRIGGER 40 bool 41 42if LIS2DW12_TRIGGER 43 44config LIS2DW12_THREAD_PRIORITY 45 int "Thread priority" 46 depends on LIS2DW12_TRIGGER_OWN_THREAD 47 default 10 48 help 49 Priority of thread used by the driver to handle interrupts. 50 51config LIS2DW12_THREAD_STACK_SIZE 52 int "Thread stack size" 53 depends on LIS2DW12_TRIGGER_OWN_THREAD 54 default 1024 55 help 56 Stack size of thread used by the driver to handle interrupts. 57 58config LIS2DW12_TAP 59 bool "Tap and Tap-Tap detection" 60 help 61 Enable tap (single/double) detection 62 63endif # LIS2DW12_TRIGGER 64 65config LIS2DW12_THRESHOLD 66 bool "Wakeup threshold trigger (via interrupt)" 67 help 68 Enable the wakeup threshold trigger feature. 69 The wake-up interrupt signal is generated if a certain number of 70 consecutive data exceed the configured threshold (config in DT). 71 The threshold is applied to both positive and negative data: for 72 a wake-up interrupt generation at least one of the three axes must 73 be bigger than the threshold. See ST AN5038 for more details about 74 the feature. 75 76config LIS2DW12_FREEFALL 77 bool "Free Fall detection (via interrupt)" 78 help 79 Enable freefall detection via interrupt. 80endif # LIS2DW12 81