]> git.sur5r.net Git - u-boot/blobdiff - drivers/hwmon/lm81.c
License cleanup: remove all files with "All Rights Reserved" notices.
[u-boot] / drivers / hwmon / lm81.c
index 03bc53d58c421e631ffe01210b9b1fa848b25a4f..afe5b0de3fa06ceb8304298de61b62c59b9c6cbc 100644 (file)
  */
 
 #include <common.h>
-
-#ifdef CONFIG_DTT_LM81
-#if !defined(CFG_EEPROM_PAGE_WRITE_ENABLE) || \
-       (CFG_EEPROM_PAGE_WRITE_BITS < 1)
-# error "CFG_EEPROM_PAGE_WRITE_ENABLE must be defined and CFG_EEPROM_PAGE_WRITE_BITS must be greater than  1 to use CONFIG_DTT_LM81"
-#endif
-
 #include <i2c.h>
 #include <dtt.h>
 
  * Device code
  */
 #define DTT_I2C_DEV_CODE 0x2c                  /* ON Semi's LM81 device */
+#define DTT_READ_TEMP          0x27
+#define DTT_CONFIG_TEMP                0x4b
+#define DTT_TEMP_MAX           0x39
+#define DTT_TEMP_HYST          0x3a
+#define DTT_CONFIG             0x40
 
 int dtt_read(int sensor, int reg)
 {
@@ -111,7 +109,7 @@ static int _dtt_init(int sensor)
        if (adr < 0)
                return 1;
 
-       printf ("DTT:   Found LM81@%x Rev: %d\n", adr, rev);
+       debug ("DTT:   Found LM81@%x Rev: %d\n", adr, rev);
        return 0;
 } /* _dtt_init() */
 
@@ -144,5 +142,3 @@ int dtt_get_temp(int sensor)
 
        return (TEMP_FROM_REG((val << 1) + ((tmpcnf & 0x80) >> 7))) / 10;
 } /* dtt_get_temp() */
-
-#endif /* CONFIG_DTT_LM81 */