blob: 29268f64ea2b478515b3974ac968fad02177d87e [file] [log] [blame]
wdenkc6097192002-11-03 00:24:07 +00001/*
2 * (C) Copyright 2001
3 * Erik Theisen, Wave 7 Optics, etheisen@mindspring.com.
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenkc6097192002-11-03 00:24:07 +00006 */
7
8/*
9 * Digital Thermometers and Thermostats.
10 */
11#ifndef _DTT_H_
12#define _DTT_H_
13
Wolfgang Denkb734e552008-08-18 23:50:20 +020014#if defined(CONFIG_DTT_ADM1021) || \
15 defined(CONFIG_DTT_ADT7460) || \
16 defined(CONFIG_DTT_DS1621) || \
17 defined(CONFIG_DTT_DS1775) || \
Dirk Eibach1c6fe6e2008-10-08 13:44:27 +020018 defined(CONFIG_DTT_LM63) || \
Wolfgang Denkb734e552008-08-18 23:50:20 +020019 defined(CONFIG_DTT_LM73) || \
20 defined(CONFIG_DTT_LM75) || \
21 defined(CONFIG_DTT_LM81)
wdenk6dd652f2003-06-19 23:40:20 +000022
wdenkc6097192002-11-03 00:24:07 +000023#define CONFIG_DTT /* We have a DTT */
24
wdenk6dd652f2003-06-19 23:40:20 +000025#ifndef CONFIG_DTT_ADM1021
wdenkc6097192002-11-03 00:24:07 +000026#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 */
Michal Simek6ecbb452008-07-11 11:50:53 +020029
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020030#ifndef CONFIG_SYS_DTT_MAX_TEMP
31#define CONFIG_SYS_DTT_MAX_TEMP DTT_COMMERCIAL_MAX_TEMP
wdenkc6097192002-11-03 00:24:07 +000032#endif
Michal Simek6ecbb452008-07-11 11:50:53 +020033
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020034#ifndef CONFIG_SYS_DTT_HYSTERESIS
35#define CONFIG_SYS_DTT_HYSTERESIS 5 /* 5 C */
wdenkc6097192002-11-03 00:24:07 +000036#endif
wdenk6dd652f2003-06-19 23:40:20 +000037#endif /* CONFIG_DTT_ADM1021 */
wdenkc6097192002-11-03 00:24:07 +000038
Dirk Eibachb88e7b32011-10-13 23:23:12 +000039extern void dtt_init(void);
Heiko Schocher780f13a2011-08-01 04:01:43 +000040extern int dtt_init_one(int);
wdenkc6097192002-11-03 00:24:07 +000041extern int dtt_read(int sensor, int reg);
42extern int dtt_write(int sensor, int reg, int val);
43extern int dtt_get_temp(int sensor);
44#endif
45
wdenkc6097192002-11-03 00:24:07 +000046#endif /* _DTT_H_ */