1# ADT7310 temperature sensor configuration options
2
3# Copyright (c) 2023 Andriy Gelman
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig ADT7310
7	bool "ADT7310 Temperature Sensor"
8	default y
9	depends on DT_HAS_ADI_ADT7310_ENABLED
10	select SPI
11	help
12	  Enable the driver for Analog Devices ADT7310 High-Accuracy
13	  16-bit Digital SPI Temperature Sensors.
14
15if ADT7310
16
17config ADT7310_TRIGGER
18	bool
19	depends on GPIO
20
21choice
22	prompt "Sets trigger mode"
23	default ADT7310_TRIGGER_NONE
24	help
25	  Sets thread type for the interrupt handler.
26
27config ADT7310_TRIGGER_NONE
28	bool "No trigger"
29
30config ADT7310_TRIGGER_GLOBAL_THREAD
31	bool "Use global thread"
32	depends on GPIO
33	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ADI_ADT7310),int-gpios)
34	select ADT7310_TRIGGER
35	help
36	  Use a global thread for the interrupt handler.
37
38config ADT7310_TRIGGER_OWN_THREAD
39	bool "Use own thread"
40	depends on GPIO
41	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ADI_ADT7310),int-gpios)
42	select ADT7310_TRIGGER
43	help
44	  Use a separate thread for the interrupt handler.
45
46endchoice
47
48if ADT7310_TRIGGER_OWN_THREAD
49
50config ADT7310_THREAD_PRIORITY
51	int "Thread priority of the interrupt handler"
52	default 1
53	help
54	  Thread priority of the interrupt handler. A higher number implies a
55	  higher priority. The thread is cooperative and will not be interrupted by
56	  another thread until execution is released.
57
58config ADT7310_THREAD_STACK_SIZE
59	int "Stack size of the interrupt handler thread"
60	default 1024
61	help
62	  Stack size of the interrupt handler thread.
63
64endif # ADT7310_TRIGGER_OWN_THREAD
65
66endif # ADT7310
67