1# Texas Instruments TMAG5170 high-precision, linear 3D Hall-effect sensor with SPI bus interface 2 3# Copyright (c) 2023 Michal Morsisko 4# SPDX-License-Identifier: Apache-2.0 5 6menuconfig TMAG5170 7 bool "TMAG5170 SPI Hall-effect sensor driver" 8 default y 9 depends on DT_HAS_TI_TMAG5170_ENABLED 10 select SPI 11 help 12 Enable driver for TMAG5170 Hall-effect sensor driver 13 14if TMAG5170 15 16choice TMAG5170_TRIGGER_MODE 17 prompt "Trigger mode" 18 help 19 Specify the type of triggering to be used by the driver. 20 21config TMAG5170_TRIGGER_NONE 22 bool "No trigger" 23 24config TMAG5170_TRIGGER_GLOBAL_THREAD 25 bool "Use global thread" 26 depends on GPIO 27 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_TI_TMAG5170),int-gpios) 28 select TMAG5170_TRIGGER 29 30config TMAG5170_TRIGGER_OWN_THREAD 31 bool "Use own thread" 32 depends on GPIO 33 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_TI_TMAG5170),int-gpios) 34 select TMAG5170_TRIGGER 35 36config TMAG5170_TRIGGER_DIRECT 37 bool "Process trigger within interrupt context" 38 depends on GPIO 39 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_TI_TMAG5170),int-gpios) 40 select TMAG5170_TRIGGER 41 42endchoice 43 44config TMAG5170_CRC 45 bool "Use CRC error detection" 46 default y 47 select CRC 48 help 49 Verify CRC of RX data and append CRC to TX data 50 51config TMAG5170_TRIGGER 52 bool 53 54if TMAG5170_TRIGGER 55 56config TMAG5170_THREAD_PRIORITY 57 int "Thread priority" 58 depends on TMAG5170_TRIGGER_OWN_THREAD 59 default 10 60 help 61 Priority of thread used by the driver to handle interrupts. 62 63config TMAG5170_THREAD_STACK_SIZE 64 int "Thread stack size" 65 depends on TMAG5170_TRIGGER_OWN_THREAD 66 default 1024 67 help 68 Stack size of thread used by the driver to handle interrupts. 69 70endif # TMAG5170_TRIGGER 71 72endif # TMAG5170 73