1# Copyright 2023 Daniel DeGrasse <daniel@degrasse.com>
2# SPDX-License-Identifier: Apache-2.0
3
4config TCN75A
5	bool "TCN75A Ambient Temperature Sensor"
6	default y
7	depends on DT_HAS_MICROCHIP_TCN75A_ENABLED
8	select I2C
9	help
10	  Enable TCN75A ambient temperature to digital converter
11
12if TCN75A
13
14choice
15	prompt "TCN75A Trigger mode"
16	default TCN75A_TRIGGER_NONE
17
18config TCN75A_TRIGGER_NONE
19	bool "No trigger"
20
21config TCN75A_TRIGGER_OWN_THREAD
22	bool "Use own thread"
23	depends on GPIO
24	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_MICROCHIP_TCN75A),alert-gpios)
25	select TCN75A_TRIGGER
26
27config TCN75A_TRIGGER_GLOBAL_THREAD
28	bool "Use global thread"
29	depends on GPIO
30	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_MICROCHIP_TCN75A),alert-gpios)
31	select TCN75A_TRIGGER
32
33endchoice
34
35config TCN75A_TRIGGER
36	bool
37	help
38	  Enable interrupt based trigger support for TCN75A. Requires that
39	  the sensor be set to continuous sample mode.
40
41if TCN75A_TRIGGER_OWN_THREAD
42
43config TCN75A_THREAD_PRIORITY
44	int "Own thread priority"
45	default 10
46
47config TCN75A_THREAD_STACK_SIZE
48	int "Own thread stack size"
49	default 1024
50
51endif # TCN75A_TRIGGER_OWN_THREAD
52
53
54endif # TCN75A
55