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 | bd8ec7e | 2013-10-07 13:07:26 +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) || \ |
Albert ARIBAUD \(3ADEV\) | 34b3b4b | 2015-03-31 11:40:48 +0200 | [diff] [blame^] | 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) |
wdenk | b00ec16 | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 23 | |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 24 | #define CONFIG_DTT /* We have a DTT */ |
| 25 | |
wdenk | b00ec16 | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 26 | #ifndef CONFIG_DTT_ADM1021 |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 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 */ |
Michal Simek | 10de36d | 2008-07-11 11:50:53 +0200 | [diff] [blame] | 30 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 31 | #ifndef CONFIG_SYS_DTT_MAX_TEMP |
| 32 | #define CONFIG_SYS_DTT_MAX_TEMP DTT_COMMERCIAL_MAX_TEMP |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 33 | #endif |
Michal Simek | 10de36d | 2008-07-11 11:50:53 +0200 | [diff] [blame] | 34 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 35 | #ifndef CONFIG_SYS_DTT_HYSTERESIS |
| 36 | #define CONFIG_SYS_DTT_HYSTERESIS 5 /* 5 C */ |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 37 | #endif |
wdenk | b00ec16 | 2003-06-19 23:40:20 +0000 | [diff] [blame] | 38 | #endif /* CONFIG_DTT_ADM1021 */ |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 39 | |
Dirk Eibach | fe64eff | 2011-10-13 23:23:12 +0000 | [diff] [blame] | 40 | extern void dtt_init(void); |
Heiko Schocher | 8df768c | 2011-08-01 04:01:43 +0000 | [diff] [blame] | 41 | extern int dtt_init_one(int); |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 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 | |
wdenk | c609719 | 2002-11-03 00:24:07 +0000 | [diff] [blame] | 47 | #endif /* _DTT_H_ */ |