1# FDC2X1X Capacitance-to-Digital Converter configuration options
2
3# Copyright (c) 2020 arithmetics.io
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig FDC2X1X
7	bool "FDC2X1X Capacitance-to-Digital Converter"
8	default y
9	depends on DT_HAS_TI_FDC2X1X_ENABLED
10	depends on FULL_LIBC_SUPPORTED || EXTERNAL_LIBC
11	select I2C
12	help
13	  Enable driver for FDC2X1X Capacitance-to-Digital Converter.
14
15if FDC2X1X
16
17choice
18	prompt "Trigger mode"
19	default FDC2X1X_TRIGGER_NONE
20	help
21	  Specify the type of triggering used by the driver.
22
23config FDC2X1X_TRIGGER_NONE
24	bool "No trigger"
25
26config FDC2X1X_TRIGGER_GLOBAL_THREAD
27	bool "Use global thread"
28	depends on GPIO
29	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_TI_FDC2X1X),intb-gpios)
30	select FDC2X1X_TRIGGER
31
32config FDC2X1X_TRIGGER_OWN_THREAD
33	bool "Use own thread"
34	depends on GPIO
35	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_TI_FDC2X1X),intb-gpios)
36	select FDC2X1X_TRIGGER
37
38endchoice
39
40config FDC2X1X_TRIGGER
41	bool
42
43config FDC2X1X_THREAD_PRIORITY
44	int "Thread priority"
45	depends on FDC2X1X_TRIGGER_OWN_THREAD && FDC2X1X_TRIGGER
46	default 10
47	help
48	  Priority of thread used by the driver to handle interrupts.
49
50config FDC2X1X_THREAD_STACK_SIZE
51	int "Thread stack size"
52	depends on FDC2X1X_TRIGGER_OWN_THREAD && FDC2X1X_TRIGGER
53	default 1024
54	help
55	  Stack size of thread used by the driver to handle interrupts.
56
57endif # FDC2X1X
58