wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2001 |
| 3 | * Erik Theisen, Wave 7 Optics, etheisen@mindspring.com. |
| 4 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | /* |
| 9 | * Digital Thermometers and Thermostats. |
| 10 | */ |
| 11 | #ifndef _DTT_H_ |
| 12 | #define _DTT_H_ |
| 13 | |
Wolfgang Denk | e6f95af | 2008-08-18 23:50:20 +0200 | [diff] [blame] | 14 | #if defined(CONFIG_DTT_ADM1021) || \ |
| 15 | defined(CONFIG_DTT_ADT7460) || \ |
| 16 | defined(CONFIG_DTT_DS1621) || \ |
| 17 | defined(CONFIG_DTT_DS1775) || \ |
Dirk Eibach | 8fdffec | 2008-10-08 13:44:27 +0200 | [diff] [blame] | 18 | defined(CONFIG_DTT_LM63) || \ |
Wolfgang Denk | e6f95af | 2008-08-18 23:50:20 +0200 | [diff] [blame] | 19 | defined(CONFIG_DTT_LM73) || \ |
| 20 | defined(CONFIG_DTT_LM75) || \ |
| 21 | defined(CONFIG_DTT_LM81) |
wdenk | b00ec16 | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 22 | |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 23 | #define CONFIG_DTT /* We have a DTT */ |
| 24 | |
wdenk | b00ec16 | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 25 | #ifndef CONFIG_DTT_ADM1021 |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 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 */ |
Michal Simek | 10de36d | 2008-07-11 11:50:53 +0200 | [diff] [blame] | 29 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 30 | #ifndef CONFIG_SYS_DTT_MAX_TEMP |
| 31 | #define CONFIG_SYS_DTT_MAX_TEMP DTT_COMMERCIAL_MAX_TEMP |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 32 | #endif |
Michal Simek | 10de36d | 2008-07-11 11:50:53 +0200 | [diff] [blame] | 33 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 34 | #ifndef CONFIG_SYS_DTT_HYSTERESIS |
| 35 | #define CONFIG_SYS_DTT_HYSTERESIS 5 /* 5 C */ |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 36 | #endif |
wdenk | b00ec16 | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 37 | #endif /* CONFIG_DTT_ADM1021 */ |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 38 | |
Dirk Eibach | fe64eff | 2011-10-13 23:23:12 +0000 | [diff] [blame] | 39 | extern void dtt_init(void); |
Heiko Schocher | 8df768c | 2011-08-01 04:01:43 +0000 | [diff] [blame] | 40 | extern int dtt_init_one(int); |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 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 | |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 46 | #endif /* _DTT_H_ */ |