diff --git a/CHANGES b/CHANGES index c76ff57c..ae63ecd2 100644 --- a/CHANGES +++ b/CHANGES @@ -14,11 +14,13 @@ ask CVS about it: cvs diff -r V2-0-0 -r V2-0-1 -u 2.5.2 (200007??) - Programs: understand /dev/i2c* files (instead of /dev/i2c-*) too. - Program sensors-detect: more robustness in case of unknown i2c adapters + File sensors.conf.eg: Fix lm80 in8 calculation Module w83781d: W83783S no longer crashes on unloading + Program sensors-detect: more robustness in case of unknown i2c adapters + Program sensors-detect, libsensors: fix eeprom size reporting Program sensord: more flexility, support for alarm scanning etc. Program sensors: support for ignore setting on sensor alarms. + Programs: understand /dev/i2c* files (instead of /dev/i2c-*) too. 2.5.1 (20000618) Library: Add adm1025 support diff --git a/lib/chips.c b/lib/chips.c index 69389796..f6caaf1f 100644 --- a/lib/chips.c +++ b/lib/chips.c @@ -1758,6 +1758,7 @@ static sensors_chip_feature eeprom_features[] = { SENSORS_EEPROM_TYPE, "Memory type", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, SENSORS_MODE_R, EEPROM_SYSCTL1, VALUE(3), 0 }, +/* cheat and use the row-address-bits label for the total size in sensors */ { SENSORS_EEPROM_ROWADDR, "SDRAM Size (MB)", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, SENSORS_MODE_R, EEPROM_SYSCTL1, VALUE(4), 0 }, @@ -1767,6 +1768,9 @@ static sensors_chip_feature eeprom_features[] = { SENSORS_EEPROM_NUMROWS, "num rows", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, SENSORS_MODE_R, EEPROM_SYSCTL1, VALUE(6), 0 }, + { SENSORS_EEPROM_BANKS, "banks", + SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, + SENSORS_MODE_R, EEPROM_SYSCTL2, VALUE(2), 0 }, { 0 } }; diff --git a/lib/chips.h b/lib/chips.h index 2d7552b0..e4cbf930 100644 --- a/lib/chips.h +++ b/lib/chips.h @@ -815,5 +815,6 @@ #define SENSORS_EEPROM_ROWADDR 12 #define SENSORS_EEPROM_COLADDR 13 #define SENSORS_EEPROM_NUMROWS 14 +#define SENSORS_EEPROM_BANKS 15 #endif /* def LIB_SENSORS_CHIPS_H */ diff --git a/prog/sensors/chips.c b/prog/sensors/chips.c index 3b109b1c..da878af0 100644 --- a/prog/sensors/chips.c +++ b/prog/sensors/chips.c @@ -1756,7 +1756,7 @@ void print_ddcmon(const sensors_chip_name *name) void print_eeprom(const sensors_chip_name *name) { char *label = NULL; - double a, b, c; + double a, b, c, d; int valid, i; if (!sensors_get_label_and_valid(*name, SENSORS_EEPROM_TYPE, &label,&valid) && @@ -1774,14 +1774,18 @@ void print_eeprom(const sensors_chip_name *name) if (!sensors_get_label_and_valid(*name, SENSORS_EEPROM_ROWADDR, &label,&valid) && !sensors_get_feature(*name, SENSORS_EEPROM_ROWADDR, &a) && !sensors_get_feature(*name, SENSORS_EEPROM_COLADDR, &b) && - !sensors_get_feature(*name, SENSORS_EEPROM_NUMROWS, &c)) { + !sensors_get_feature(*name, SENSORS_EEPROM_NUMROWS, &c) && + !sensors_get_feature(*name, SENSORS_EEPROM_BANKS, &d)) { if (valid) { print_label(label, 24); - i = (((int) a) & 0x0f) + (((int) b) & 0x0f) + ((int) c) - 16; - if(i > 0 && i <= 10) - printf("%d\n", 1 << i); + i = (((int) a) & 0x0f) + (((int) b) & 0x0f) - 17; + if(i > 0 && i <= 12 && c <= 8 && d <= 8) + printf("%d\n", (1 << i) * ((int) c) * ((int) d)); else +{ printf("invalid\n"); +printf("%d %d %d %d\n", (int) a, (int) b, (int) c, (int) d); +} } } else printf("ERROR: data 2\n");