blob: 173159dc6287552c56e492ae09bc3d243b922095 [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 Denk3765b3e2013-10-07 13:07:26 +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) || \
Albert ARIBAUD \(3ADEV\)24d528e2015-03-31 11:40:48 +020015 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)
wdenk6dd652f2003-06-19 23:40:20 +000023
wdenkc6097192002-11-03 00:24:07 +000024#define CONFIG_DTT /* We have a DTT */
25
wdenk6dd652f2003-06-19 23:40:20 +000026#ifndef CONFIG_DTT_ADM1021
wdenkc6097192002-11-03 00:24:07 +000027#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 */
Michal Simek6ecbb452008-07-11 11:50:53 +020030
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020031#ifndef CONFIG_SYS_DTT_MAX_TEMP
32#define CONFIG_SYS_DTT_MAX_TEMP DTT_COMMERCIAL_MAX_TEMP
wdenkc6097192002-11-03 00:24:07 +000033#endif
Michal Simek6ecbb452008-07-11 11:50:53 +020034
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020035#ifndef CONFIG_SYS_DTT_HYSTERESIS
36#define CONFIG_SYS_DTT_HYSTERESIS 5 /* 5 C */
wdenkc6097192002-11-03 00:24:07 +000037#endif
wdenk6dd652f2003-06-19 23:40:20 +000038#endif /* CONFIG_DTT_ADM1021 */
wdenkc6097192002-11-03 00:24:07 +000039
Dirk Eibachb88e7b32011-10-13 23:23:12 +000040extern void dtt_init(void);
Heiko Schocher780f13a2011-08-01 04:01:43 +000041extern int dtt_init_one(int);
wdenkc6097192002-11-03 00:24:07 +000042extern int dtt_read(int sensor, int reg);
43extern int dtt_write(int sensor, int reg, int val);
44extern int dtt_get_temp(int sensor);
45#endif
46
wdenkc6097192002-11-03 00:24:07 +000047#endif /* _DTT_H_ */