blob: 058bca4d5d6c0193e7e83bb1ab3714359cdd2a8c
1 | /* |
2 | * (C) Copyright 2001 |
3 | * Erik Theisen, Wave 7 Optics, etheisen@mindspring.com. |
4 | * |
5 | * SPDX-License-Identifier: GPL-2.0+ |
6 | */ |
7 | |
8 | /* |
9 | * Digital Thermometers and Thermostats. |
10 | */ |
11 | #ifndef _DTT_H_ |
12 | #define _DTT_H_ |
13 | |
14 | #if defined(CONFIG_DTT_ADM1021) || \ |
15 | defined(CONFIG_DTT_ADT7460) || \ |
16 | defined(CONFIG_DTT_DS1621) || \ |
17 | defined(CONFIG_DTT_DS1775) || \ |
18 | defined(CONFIG_DTT_LM63) || \ |
19 | defined(CONFIG_DTT_LM73) || \ |
20 | defined(CONFIG_DTT_LM75) || \ |
21 | defined(CONFIG_DTT_LM81) |
22 | |
23 | #define CONFIG_DTT /* We have a DTT */ |
24 | |
25 | #ifndef CONFIG_DTT_ADM1021 |
26 | #define DTT_COMMERCIAL_MAX_TEMP 70 /* 0 - +70 C */ |
27 | #define DTT_INDUSTRIAL_MAX_TEMP 85 /* -40 - +85 C */ |
28 | #define DTT_AUTOMOTIVE_MAX_TEMP 105 /* -40 - +105 C */ |
29 | |
30 | #ifndef CONFIG_SYS_DTT_MAX_TEMP |
31 | #define CONFIG_SYS_DTT_MAX_TEMP DTT_COMMERCIAL_MAX_TEMP |
32 | #endif |
33 | |
34 | #ifndef CONFIG_SYS_DTT_HYSTERESIS |
35 | #define CONFIG_SYS_DTT_HYSTERESIS 5 /* 5 C */ |
36 | #endif |
37 | #endif /* CONFIG_DTT_ADM1021 */ |
38 | |
39 | extern void dtt_init(void); |
40 | extern int dtt_init_one(int); |
41 | extern int dtt_read(int sensor, int reg); |
42 | extern int dtt_write(int sensor, int reg, int val); |
43 | extern int dtt_get_temp(int sensor); |
44 | #endif |
45 | |
46 | #endif /* _DTT_H_ */ |
47 |