blob: 34053d10abfbfb52ef3ebbe606ec5f040b775ceb [file] [log] [blame]
wdenkc6097192002-11-03 00:24:07 +00001/*
2 * (C) Copyright 2001
3 * Erik Theisen, Wave 7 Optics, etheisen@mindspring.com.
4 *
5 * See file CREDITS for list of people who contributed to this
6 * project.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 * MA 02111-1307 USA
22 */
23
24/*
25 * Digital Thermometers and Thermostats.
26 */
27#ifndef _DTT_H_
28#define _DTT_H_
29
wdenk6dd652f2003-06-19 23:40:20 +000030#if defined(CONFIG_DTT_LM75) || \
31 defined(CONFIG_DTT_DS1621) || \
John Otkend4024bb2007-07-26 17:49:11 +020032 defined(CONFIG_DTT_DS1775) || \
Heiko Schocher6dedf3d2006-12-21 16:14:48 +010033 defined(CONFIG_DTT_LM81) || \
Larry Johnson9e2c3472007-12-27 09:52:17 -050034 defined(CONFIG_DTT_ADM1021) || \
35 defined(CONFIG_DTT_LM73)
wdenk6dd652f2003-06-19 23:40:20 +000036
wdenkc6097192002-11-03 00:24:07 +000037#define CONFIG_DTT /* We have a DTT */
38
wdenk6dd652f2003-06-19 23:40:20 +000039#ifndef CONFIG_DTT_ADM1021
wdenkc6097192002-11-03 00:24:07 +000040#define DTT_COMMERCIAL_MAX_TEMP 70 /* 0 - +70 C */
41#define DTT_INDUSTRIAL_MAX_TEMP 85 /* -40 - +85 C */
42#define DTT_AUTOMOTIVE_MAX_TEMP 105 /* -40 - +105 C */
Michal Simek6ecbb452008-07-11 11:50:53 +020043
wdenkc6097192002-11-03 00:24:07 +000044#ifndef CFG_DTT_MAX_TEMP
45#define CFG_DTT_MAX_TEMP DTT_COMMERCIAL_MAX_TEMP
46#endif
Michal Simek6ecbb452008-07-11 11:50:53 +020047
wdenkc6097192002-11-03 00:24:07 +000048#ifndef CFG_DTT_HYSTERESIS
49#define CFG_DTT_HYSTERESIS 5 /* 5 C */
50#endif
wdenk6dd652f2003-06-19 23:40:20 +000051#endif /* CONFIG_DTT_ADM1021 */
wdenkc6097192002-11-03 00:24:07 +000052
53extern int dtt_init (void);
54extern int dtt_read(int sensor, int reg);
55extern int dtt_write(int sensor, int reg, int val);
56extern int dtt_get_temp(int sensor);
57#endif
58
wdenkc6097192002-11-03 00:24:07 +000059#endif /* _DTT_H_ */