Changeset 4574
- Timestamp:
- 07/07/07 10:09:38 (1 year ago)
- Files:
-
- lm-sensors/trunk/CHANGES (modified) (2 diffs)
- lm-sensors/trunk/kernel/chips/lm85.c (modified) (2 diffs)
- lm-sensors/trunk/prog/sensors/chips.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/CHANGES
r4565 r4574 17 17 Module i2c-nforce2: Add nForce MCP61, MCP65 support (2.6 backport) 18 18 Module lm85: Fix setting the fan speed min limit to 0 19 Add support for the EMC6D102 extra resolution bits 19 20 Module thmc50: Fix the i2c address range 20 21 Module w83627ehf: New (2.6 backport) … … 44 45 Add support for the w83627ehf thermal sensor types 45 46 Add support for it87 fan4 and fan5 47 Display the extra resolution bits of the emc6d102 46 48 Program sensors-detect: Stop Super-I/O probe after first family success 47 49 Fix SMSC DME1737 detection lm-sensors/trunk/kernel/chips/lm85.c
r4573 r4574 165 165 #define EMC6D100_REG_IN_MIN(nr) (0x73 + ((nr)-5) * 2) 166 166 #define EMC6D100_REG_IN_MAX(nr) (0x74 + ((nr)-5) * 2) 167 168 #define EMC6D102_REG_EXTEND_ADC1 0x85 169 #define EMC6D102_REG_EXTEND_ADC2 0x86 170 #define EMC6D102_REG_EXTEND_ADC3 0x87 171 #define EMC6D102_REG_EXTEND_ADC4 0x88 167 172 168 173 /* Conversions. Rounding and limit checking is only done on the TO_REG … … 1163 1168 1164 1169 break ; 1170 case emc6d102 : 1171 /* Have to read LSB bits after the MSB ones because 1172 the reading of the MSB bits has frozen the 1173 LSBs (backward from the ADM1027). 1174 We use only two extra bits per channel, and encode 1175 them in the same format the ADM1027 uses, to keep the 1176 rest of the code unchanged. 1177 */ 1178 i = lm85_read_value(client, EMC6D102_REG_EXTEND_ADC1); 1179 data->extend_adc = (i & 0xcc) << 8; /* temp3, temp1 */ 1180 i = lm85_read_value(client, EMC6D102_REG_EXTEND_ADC2); 1181 data->extend_adc |= (i & 0x0c) << 10; /* temp2 */ 1182 data->extend_adc |= (i & 0xc0) << 2; /* in4 */ 1183 i = lm85_read_value(client, EMC6D102_REG_EXTEND_ADC3); 1184 data->extend_adc |= (i & 0x0c) >> 2; /* in0 */ 1185 data->extend_adc |= i & 0xc0; /* in3 */ 1186 i = lm85_read_value(client, EMC6D102_REG_EXTEND_ADC4); 1187 data->extend_adc |= i & 0x0c; /* in1 */ 1188 data->extend_adc |= (i & 0xc0) >> 2; /* in2 */ 1189 break; 1165 1190 default : break ; /* no warnings */ 1166 1191 } lm-sensors/trunk/prog/sensors/chips.c
r4565 r4574 1559 1559 double cur, min, max; 1560 1560 int alarms, alarm_mask = 0, valid; 1561 int is1027, is7463, is6d100 ;1561 int is1027, is7463, is6d100, xadc; 1562 1562 1563 1563 is1027 = !strcmp(name->prefix,"adm1027") … … 1565 1565 is7463 = !strcmp(name->prefix, "adt7463"); 1566 1566 is6d100 = !strcmp(name->prefix,"emc6d100") ; 1567 xadc = is1027 || !strcmp(name->prefix, "emc6d102"); 1567 1568 1568 1569 if (!sensors_get_feature(*name,SENSORS_LM85_ALARMS,&cur)) … … 1585 1586 print_label(label,10); 1586 1587 printf("%+7.*f V (min = %+6.2f V, max = %+6.2f V) %s", 1587 ( is1027?3:2),cur,min,max,alarms&LM85_ALARM_IN0?"ALARM":"");1588 (xadc?3:2),cur,min,max,alarms&LM85_ALARM_IN0?"ALARM":""); 1588 1589 if (is1027) { printf(alarm_mask&LM85_ALARM_IN0?" MASKED":""); } 1589 1590 putchar( '\n' ); … … 1599 1600 print_label(label,10); 1600 1601 printf("%+7.*f V (min = %+6.2f V, max = %+6.2f V) %s", 1601 ( is1027?3:2),cur,min,max,alarms&LM85_ALARM_IN1?"ALARM":"");1602 (xadc?3:2),cur,min,max,alarms&LM85_ALARM_IN1?"ALARM":""); 1602 1603 if (is1027) { printf(alarm_mask&LM85_ALARM_IN1?" MASKED":""); } 1603 1604 putchar( '\n' ); … … 1613 1614 print_label(label,10); 1614 1615 printf("%+7.*f V (min = %+6.2f V, max = %+6.2f V) %s", 1615 ( is1027?3:2),cur,min,max,alarms&LM85_ALARM_IN2?"ALARM":"");1616 (xadc?3:2),cur,min,max,alarms&LM85_ALARM_IN2?"ALARM":""); 1616 1617 if (is1027) { printf(alarm_mask&LM85_ALARM_IN2?" MASKED":""); } 1617 1618 putchar( '\n' ); … … 1627 1628 print_label(label,10); 1628 1629 printf("%+7.*f V (min = %+6.2f V, max = %+6.2f V) %s", 1629 ( is1027?3:2),cur,min,max,alarms&LM85_ALARM_IN3?"ALARM":"");1630 (xadc?3:2),cur,min,max,alarms&LM85_ALARM_IN3?"ALARM":""); 1630 1631 if (is1027) { printf(alarm_mask&LM85_ALARM_IN3?" MASKED":""); } 1631 1632 putchar( '\n' ); … … 1641 1642 print_label(label,10); 1642 1643 printf("%+7.*f V (min = %+6.2f V, max = %+6.2f V) %s", 1643 ( is1027?3:2),cur,min,max,alarms&LM85_ALARM_IN4?"ALARM":"");1644 (xadc?3:2),cur,min,max,alarms&LM85_ALARM_IN4?"ALARM":""); 1644 1645 if (is1027) { printf(alarm_mask&LM85_ALARM_IN4?" MASKED":""); } 1645 1646 putchar( '\n' ); … … 1747 1748 if (valid) { 1748 1749 print_label(label,10); 1749 print_temp_info( cur, max, min, MINMAX, ( is1027? 2 : 0), 0);1750 print_temp_info( cur, max, min, MINMAX, (xadc ? 2 : 0), 0); 1750 1751 printf( " %s %s %s\n", 1751 1752 alarms&LM85_ALARM_TEMP1?"ALARM":"", … … 1763 1764 if (valid) { 1764 1765 print_label(label,10); 1765 print_temp_info( cur, max, min, MINMAX, ( is1027? 2 : 0), 0);1766 print_temp_info( cur, max, min, MINMAX, (xadc ? 2 : 0), 0); 1766 1767 printf( " %s %s\n", 1767 1768 alarms&LM85_ALARM_TEMP2?"ALARM":"", … … 1778 1779 if (valid) { 1779 1780 print_label(label,10); 1780 print_temp_info( cur, max, min, MINMAX, ( is1027? 2 : 0), 0);1781 print_temp_info( cur, max, min, MINMAX, (xadc ? 2 : 0), 0); 1781 1782 printf( " %s %s %s\n", 1782 1783 alarms&LM85_ALARM_TEMP3?"ALARM":"",
