]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/dtt.h
cmd_gpio.c: adjust help message depending on gpio_status being compiled in or not
[karo-tx-uboot.git] / include / dtt.h
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_DS620)       || \
19         defined(CONFIG_DTT_LM63)        || \
20         defined(CONFIG_DTT_LM73)        || \
21         defined(CONFIG_DTT_LM75)        || \
22         defined(CONFIG_DTT_LM81)
23
24 #define CONFIG_DTT                              /* We have a DTT */
25
26 #ifndef CONFIG_DTT_ADM1021
27 #define DTT_COMMERCIAL_MAX_TEMP 70              /* 0 - +70 C */
28 #define DTT_INDUSTRIAL_MAX_TEMP 85              /* -40 - +85 C */
29 #define DTT_AUTOMOTIVE_MAX_TEMP 105             /* -40 - +105 C */
30
31 #ifndef CONFIG_SYS_DTT_MAX_TEMP
32 #define CONFIG_SYS_DTT_MAX_TEMP DTT_COMMERCIAL_MAX_TEMP
33 #endif
34
35 #ifndef CONFIG_SYS_DTT_HYSTERESIS
36 #define CONFIG_SYS_DTT_HYSTERESIS       5               /* 5 C */
37 #endif
38 #endif /* CONFIG_DTT_ADM1021 */
39
40 extern void dtt_init(void);
41 extern int dtt_init_one(int);
42 extern int dtt_read(int sensor, int reg);
43 extern int dtt_write(int sensor, int reg, int val);
44 extern int dtt_get_temp(int sensor);
45 #endif
46
47 #endif /* _DTT_H_ */