1# Copyright (c) 2016 Intel Corporation 2# SPDX-License-Identifier: Apache-2.0 3 4menuconfig LIS3MDL 5 bool "LIS3MDL magnetometer" 6 default y 7 depends on DT_HAS_ST_LIS3MDL_MAGN_ENABLED 8 select I2C 9 help 10 Enable driver for LIS3MDL I2C-based magnetometer. 11 12if LIS3MDL 13 14choice LIS3MDL_TRIGGER_MODE 15 prompt "Trigger mode" 16 default LIS3MDL_TRIGGER_GLOBAL_THREAD 17 help 18 Specify the type of triggering to be used by the driver. 19 20config LIS3MDL_TRIGGER_NONE 21 bool "No trigger" 22 23config LIS3MDL_TRIGGER_GLOBAL_THREAD 24 bool "Use global thread" 25 depends on GPIO 26 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_LIS3MDL_MAGN),irq-gpios) 27 select LIS3MDL_TRIGGER 28 29config LIS3MDL_TRIGGER_OWN_THREAD 30 bool "Use own thread" 31 depends on GPIO 32 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_LIS3MDL_MAGN),irq-gpios) 33 select LIS3MDL_TRIGGER 34 35endchoice # LIS3MDL_TRIGGER_MODE 36 37config LIS3MDL_TRIGGER 38 bool 39 40config LIS3MDL_THREAD_PRIORITY 41 int "Thread priority" 42 depends on LIS3MDL_TRIGGER_OWN_THREAD 43 default 10 44 help 45 Priority of thread used by the driver to handle interrupts. 46 47config LIS3MDL_THREAD_STACK_SIZE 48 int "Thread stack size" 49 depends on LIS3MDL_TRIGGER_OWN_THREAD 50 default 1024 51 help 52 Stack size of thread used by the driver to handle interrupts. 53 54config LIS3MDL_ODR 55 string "Output data rate" 56 default "0.625" 57 help 58 Magnetometer output data rate expressed in samples per second. 59 Data rates supported by the chip are 0.625, 1.25, 2.5, 5, 10, 20, 60 40, 80, 155, 300, 560 and 1000. 61 62config LIS3MDL_FS 63 int "Full-scale range" 64 default 4 65 help 66 Magnetometer full-scale range. 67 An X value for the config represents a range of +/- X gauss. Valid 68 values are 4, 8, 12 and 16. 69 70endif # LIS3MDL 71