1# ST Microelectronics STTS751 temperature sensor
2
3# Copyright (c) 2019 STMicroelectronics
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig STTS751
7	bool "STTS751 temperature sensor"
8	depends on I2C
9	select HAS_STMEMSC
10	select USE_STDC_STTS751
11	help
12	  Enable driver for STTS751 I2C-based temperature sensor.
13
14if STTS751
15
16choice STTS751_TRIGGER_MODE
17	prompt "Trigger mode"
18	default STTS751_TRIGGER_GLOBAL_THREAD
19	help
20	  Specify the type of triggering to be used by the driver.
21
22config STTS751_TRIGGER_NONE
23	bool "No trigger"
24
25config STTS751_TRIGGER_GLOBAL_THREAD
26	bool "Use global thread"
27	depends on GPIO
28	select STTS751_TRIGGER
29
30config STTS751_TRIGGER_OWN_THREAD
31	bool "Use own thread"
32	depends on GPIO
33	select STTS751_TRIGGER
34
35endchoice # STTS751_TRIGGER_MODE
36
37config STTS751_TRIGGER
38	bool
39
40config STTS751_THREAD_PRIORITY
41	int "Thread priority"
42	depends on STTS751_TRIGGER_OWN_THREAD
43	default 10
44	help
45	  Priority of thread used by the driver to handle interrupts.
46
47config STTS751_THREAD_STACK_SIZE
48	int "Thread stack size"
49	depends on STTS751_TRIGGER_OWN_THREAD
50	default 1024
51	help
52	  Stack size of thread used by the driver to handle interrupts.
53
54menu "Attributes"
55
56config STTS751_TEMP_HI_THRESHOLD
57	depends on STTS751_TRIGGER
58	int "High temperature threshold alarm"
59	default 50
60	help
61	  HIGH temperature threshold to trigger an alarm
62
63config STTS751_TEMP_LO_THRESHOLD
64	depends on STTS751_TRIGGER
65	int "Low temperature threshold alarm"
66	default 10
67	help
68	  LOW temperature threshold to trigger an alarm
69
70config STTS751_SAMPLING_RATE
71	int "Output data rate"
72	range 0 9
73	default 4
74	help
75	  Sensor output data rate expressed in conversions per second.
76	  Data rates supported by the chip are:
77	  0:  1 conv  every 16 sec
78	  1:  1 conv  every 8 sec
79	  2:  1 conv  every 4 sec
80	  3:  1 conv  every 2 sec
81	  4:  1 conv  every sec
82	  5:  2 convs every sec
83	  6:  4 convs every sec
84	  7:  8 convs every sec
85	  8: 16 convs every sec
86	  9: 32 convs every sec
87
88endmenu
89
90endif # STTS751
91