1# ADT7420 temperature sensor configuration options
2
3# Copyright (c) 2018 Analog Devices Inc.
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig ADT7420
7	bool "ADT7420 Temperature Sensor"
8	default y
9	depends on DT_HAS_ADI_ADT7420_ENABLED
10	select I2C
11	help
12	  Enable the driver for Analog Devices ADT7420 High-Accuracy
13	  16-bit Digital I2C Temperature Sensors.
14
15if ADT7420
16
17config ADT7420_TEMP_HYST
18	int "Temperature hysteresis in °C"
19	range 0 15
20	default 5
21	help
22	  Specify the temperature hysteresis in °C for the THIGH, TLOW,
23	  and TCRIT temperature limits.
24
25config ADT7420_TEMP_CRIT
26	int "Critical overtemperature in °C"
27	range -40 150
28	default 147
29	help
30	  The critical overtemperature pin asserts when the temperature
31	  exceeds this value. The default value of 147 is the reset default
32	  of the ADT7420.
33
34choice
35	prompt "Trigger mode"
36	default ADT7420_TRIGGER_NONE
37	help
38	  Specify the type of triggering used by the driver.
39
40config ADT7420_TRIGGER_NONE
41	bool "No trigger"
42
43config ADT7420_TRIGGER_GLOBAL_THREAD
44	bool "Use global thread"
45	depends on GPIO
46	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ADI_ADT7420),int-gpios)
47	select ADT7420_TRIGGER
48
49config ADT7420_TRIGGER_OWN_THREAD
50	bool "Use own thread"
51	depends on GPIO
52	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ADI_ADT7420),int-gpios)
53	select ADT7420_TRIGGER
54
55endchoice
56
57config ADT7420_TRIGGER
58	bool
59
60config ADT7420_THREAD_PRIORITY
61	int "Thread priority"
62	depends on ADT7420_TRIGGER_OWN_THREAD && ADT7420_TRIGGER
63	default 10
64	help
65	  Priority of thread used by the driver to handle interrupts.
66
67config ADT7420_THREAD_STACK_SIZE
68	int "Thread stack size"
69	depends on ADT7420_TRIGGER_OWN_THREAD && ADT7420_TRIGGER
70	default 1024
71	help
72	  Stack size of thread used by the driver to handle interrupts.
73
74endif # ADT7420
75