Changeset 839

Show
Ignore:
Timestamp:
07/09/00 05:25:04 (9 years ago)
Author:
mds
Message:

(mds) Fix eeprom size reporting. 'sensors' previously assumed

4 banks per memory chip. Add banks entry to libsensors and
use # of banks in calculation.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/CHANGES

    r837 r839  
    1515 
    16162.5.2 (200007??) 
    17   Programs: understand /dev/i2c* files (instead of /dev/i2c-*) too. 
     17  File sensors.conf.eg: Fix lm80 in8 calculation 
     18  Module w83781d: W83783S no longer crashes on unloading 
    1819  Program sensors-detect: more robustness in case of unknown i2c adapters 
    19   Module w83781d: W83783S no longer crashes on unloading 
     20  Program sensors-detect, libsensors: fix eeprom size reporting 
    2021  Program sensord: more flexility, support for alarm scanning etc. 
    2122  Program sensors: support for ignore setting on sensor alarms. 
     23  Programs: understand /dev/i2c* files (instead of /dev/i2c-*) too. 
    2224 
    23252.5.1 (20000618) 
  • lm-sensors/trunk/lib/chips.c

    r803 r839  
    17591759                         SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 
    17601760                         SENSORS_MODE_R, EEPROM_SYSCTL1, VALUE(3), 0 }, 
     1761/* cheat and use the row-address-bits label for the total size in sensors */ 
    17611762    { SENSORS_EEPROM_ROWADDR, "SDRAM Size (MB)", 
    17621763                         SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 
     
    17681769                         SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 
    17691770                         SENSORS_MODE_R, EEPROM_SYSCTL1, VALUE(6), 0 }, 
     1771    { SENSORS_EEPROM_BANKS, "banks", 
     1772                         SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 
     1773                         SENSORS_MODE_R, EEPROM_SYSCTL2, VALUE(2), 0 }, 
    17701774    { 0 } 
    17711775  }; 
  • lm-sensors/trunk/lib/chips.h

    r814 r839  
    816816#define SENSORS_EEPROM_COLADDR 13 
    817817#define SENSORS_EEPROM_NUMROWS 14 
     818#define SENSORS_EEPROM_BANKS 15 
    818819 
    819820#endif /* def LIB_SENSORS_CHIPS_H */ 
  • lm-sensors/trunk/prog/sensors/chips.c

    r837 r839  
    17571757{ 
    17581758        char  *label = NULL; 
    1759         double a, b, c
     1759        double a, b, c, d
    17601760        int    valid, i; 
    17611761 
     
    17751775       !sensors_get_feature(*name, SENSORS_EEPROM_ROWADDR, &a) && 
    17761776       !sensors_get_feature(*name, SENSORS_EEPROM_COLADDR, &b) && 
    1777        !sensors_get_feature(*name, SENSORS_EEPROM_NUMROWS, &c)) { 
     1777       !sensors_get_feature(*name, SENSORS_EEPROM_NUMROWS, &c) && 
     1778       !sensors_get_feature(*name, SENSORS_EEPROM_BANKS, &d)) { 
    17781779      if (valid) { 
    17791780         print_label(label, 24); 
    1780          i = (((int) a) & 0x0f) + (((int) b) & 0x0f) + ((int) c) - 16
    1781          if(i > 0 && i <= 10
    1782                  printf("%d\n", 1 << i); 
     1781         i = (((int) a) & 0x0f) + (((int) b) & 0x0f) - 17
     1782         if(i > 0 && i <= 12 && c <= 8 && d <= 8
     1783                 printf("%d\n", (1 << i) * ((int) c) * ((int) d)); 
    17831784         else 
     1785{ 
    17841786                 printf("invalid\n"); 
     1787printf("%d %d %d %d\n", (int) a, (int) b, (int) c, (int) d); 
     1788} 
    17851789      } 
    17861790   } else