dtt.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * (C) Copyright 2001
  3. * Erik Theisen, Wave 7 Optics, etheisen@mindspring.com.
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. /*
  8. * Digital Thermometers and Thermostats.
  9. */
  10. #ifndef _DTT_H_
  11. #define _DTT_H_
  12. #if defined(CONFIG_DTT_ADM1021) || \
  13. defined(CONFIG_DTT_ADT7460) || \
  14. defined(CONFIG_DTT_DS1621) || \
  15. defined(CONFIG_DTT_DS1775) || \
  16. defined(CONFIG_DTT_DS620) || \
  17. defined(CONFIG_DTT_LM63) || \
  18. defined(CONFIG_DTT_LM73) || \
  19. defined(CONFIG_DTT_LM75) || \
  20. defined(CONFIG_DTT_LM81)
  21. #define CONFIG_DTT /* We have a DTT */
  22. #ifndef CONFIG_DTT_ADM1021
  23. #define DTT_COMMERCIAL_MAX_TEMP 70 /* 0 - +70 C */
  24. #define DTT_INDUSTRIAL_MAX_TEMP 85 /* -40 - +85 C */
  25. #define DTT_AUTOMOTIVE_MAX_TEMP 105 /* -40 - +105 C */
  26. #ifndef CONFIG_SYS_DTT_MAX_TEMP
  27. #define CONFIG_SYS_DTT_MAX_TEMP DTT_COMMERCIAL_MAX_TEMP
  28. #endif
  29. #ifndef CONFIG_SYS_DTT_HYSTERESIS
  30. #define CONFIG_SYS_DTT_HYSTERESIS 5 /* 5 C */
  31. #endif
  32. #endif /* CONFIG_DTT_ADM1021 */
  33. extern void dtt_init(void);
  34. extern int dtt_init_one(int);
  35. extern int dtt_read(int sensor, int reg);
  36. extern int dtt_write(int sensor, int reg, int val);
  37. extern int dtt_get_temp(int sensor);
  38. #endif
  39. #endif /* _DTT_H_ */