Changeset 614
- Timestamp:
- 10/30/99 23:26:21 (9 years ago)
- Files:
-
- lm-sensors/trunk/CONTRIBUTORS (modified) (1 diff)
- lm-sensors/trunk/README (modified) (1 diff)
- lm-sensors/trunk/doc/chips/SUMMARY (modified) (1 diff)
- lm-sensors/trunk/doc/chips/w83781d (modified) (3 diffs)
- lm-sensors/trunk/kernel/chips/w83781d.c (modified) (9 diffs)
- lm-sensors/trunk/lib/chips.c (modified) (1 diff)
- lm-sensors/trunk/lib/chips.h (modified) (1 diff)
- lm-sensors/trunk/prog/detect/sensors-detect (modified) (5 diffs)
- lm-sensors/trunk/prog/sensors/chips.c (modified) (1 diff)
- lm-sensors/trunk/prog/sensors/main.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/CONTRIBUTORS
r609 r614 26 26 * Mark D. Studebaker <mds@eng.paradyne.com> 27 27 Author of the i2c-ali15x3 bus driver and the i2c-i810 bus driver. 28 Added w83782d, w83783s, and w83627hf support to the w83781d driver.29 Added max1617 and thmc10support to the adm1021 driver.28 Added w83782d, w83783s, w83627hf, and as99127f support to the w83781d driver. 29 Added max1617, thmc10, gl523sm, and lm84 support to the adm1021 driver. 30 30 Added lm81 support to the adm9240 driver. 31 31 Author of the decode-xeon.pl xeon EEPROM decoder. lm-sensors/trunk/README
r610 r614 28 28 29 29 At least the following SMBus adapters are supported: 30 Acer Labs M1541 and M1543C (used in the Aladdin IV, V and Pro 2 chipsets) 31 Apple Hydra (used on some PPC machines) 32 Intel ICH (used in the Intel 810 and 810E chipsets) 30 33 Intel PIIX4 (used in most Intel chipsets) 31 Intel ICH (used in the Intel 810 and 810E chipsets)32 Acer Labs M1541 and M1543C (used in the Aladdin IV, V and Pro 2 chipsets)33 34 VIA Technologies 82C586B (used in most VIA chipsets) 34 35 VIA Technologies VT596A/B (used in some more modern VIA chipsets) 35 Apple Hydra (used on some PPC machines)36 36 37 37 At least the following hardware sensor chips are supported: 38 Analog Devices ADM1021, ADM1022, and ADM9240 39 Asus AS99127F 40 Dallas Semiconductor DS1780 41 Hewlett Packard Maxilife (several revisions) 42 Genesys Logic GL518SM (rev 00, 80), GL520SM, GL523SM 43 Intel Xeon processor embedded sensors 44 Maxim MAX1617 and MAX1617A 38 45 National Semicoductor LM75, LM77, LM78, LM78-J, LM79. LM80, LM81, and LM84 39 Winbond W83781D, W83782D, W83783S, and W83627HF40 Genesys Logic GL518SM (rev 00, 80), GL520SM, GL523SM41 Analog Devices ADM1021, ADM1022, and ADM924042 46 SiS Southbridge (integrated in the chipset; the I2C adapter will also be 43 47 supported in the near future) 44 Maxim MAX1617 and MAX1617A45 Dallas Semiconductor DS178046 Hewlett Packard Maxilife (several revisions)47 Intel Xeon processor embedded sensors48 48 TI THMC10 and THMC50 49 Winbond W83781D, W83782D, W83783S, and W83627HF 50 49 51 50 52 We also support some miscellaneous chips: lm-sensors/trunk/doc/chips/SUMMARY
r610 r614 86 86 87 87 w83781d 88 as99127f 3 9 3 2-4 pwm yes no 88 89 w83781d 3 7 3 - yes yes 89 90 w83782d 3 9 3 2-4 pwm yes yes lm-sensors/trunk/doc/chips/w83781d
r610 r614 21 21 Prefix 'w83627hf' 22 22 Addresses scanned: I2C 0x20 - 0x2f (inclusive), ISA 0x290 (8 I/O ports) 23 Datasheet: Possibly available on request from Winbond 23 Datasheet: Unavailable from Winbond 24 * Asus AS99127F 25 Prefix 'as99127f' 26 Addresses scanned: I2C 0x20 - 0x2f (inclusive) 27 Datasheet: Unavailable from Asus 24 28 25 29 … … 56 60 57 61 This driver implements support for the Winbond W83781D, W83782D, 58 W8783S, and W83627HF chips .62 W8783S, and W83627HF chips, and the Asus AS99127F. 59 63 We will refer to them collectively as W8378* chips. 60 64 … … 62 66 enough that it was sensible to put them together in one driver. 63 67 The W83627HF chip is assumed to be identical to the W83782D. 68 The AS99127F chip is assumed to be identical to an I2C-only W83782D. 64 69 65 70 Detection of these chips can sometimes be foiled because they can be in lm-sensors/trunk/kernel/chips/w83781d.c
r601 r614 24 24 Supports following chips: 25 25 26 Chip #vin #fanin #pwm #temp wchipid i2c ISA 27 w83781d 7 3 0 3 0x10 yes yes 28 w83627hf 9 3 2-4 3 0x20 yes yes (LPC) 29 w83782d 9 3 2-4 3 0x30 yes yes 30 w83783s 5-6 3 2 1-2 0x40 yes no 26 Chip #vin #fanin #pwm #temp wchipid vendid i2c ISA 27 as99127f 9 3 2-4 3 0x20 0x12c3 yes no 28 w83781d 7 3 0 3 0x10 0x5ca3 yes yes 29 w83627hf 9 3 2-4 3 0x20 0x5ca3 yes yes (LPC) 30 w83782d 9 3 2-4 3 0x30 0x5ca3 yes yes 31 w83783s 5-6 3 2 1-2 0x40 0x5ca3 yes no 31 32 32 33 */ … … 63 64 64 65 /* Insmod parameters */ 65 SENSORS_INSMOD_ 4(w83781d,w83782d,w83783s,w83627hf);66 SENSORS_INSMOD_5(w83781d,w83782d,w83783s,w83627hf,as99127f); 66 67 67 68 /* Many W83781D constants specified below */ … … 647 648 const char *client_name = ""; 648 649 int is_isa = i2c_is_isa_adapter(adapter); 650 enum vendor {winbond, asus} vendid; 649 651 650 652 if (!is_isa && ! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA)) … … 725 727 726 728 /* We have either had a force parameter, or we have already detected the 727 Winbond. Put it now into bank 0 */729 Winbond. Put it now into bank 0 and Vendor ID High Byte */ 728 730 w83781d_write_value(new_client,W83781D_REG_BANK, 729 w83781d_read_value(new_client,W83781D_REG_BANK) & 0xf8);731 (w83781d_read_value(new_client,W83781D_REG_BANK) & 0x78) | 0x80); 730 732 731 733 /* Determine the chip type. */ 732 734 if (kind <= 0) { 735 /* get vendor ID */ 736 val2 = w83781d_read_value(new_client,W83781D_REG_CHIPMAN); 737 if (val2 == 0x5c) 738 vendid = winbond; 739 else if (val2 == 0x12) 740 vendid = asus; 741 else 742 goto ERROR1; 733 743 /* mask off lower bit, not reliable */ 734 744 val1 = w83781d_read_value(new_client,W83781D_REG_WCHIPID) & 0xfe; 735 if (val1 == 0x10 )745 if (val1 == 0x10 && vendid == winbond) 736 746 kind = w83781d; 737 else if (val1 == 0x30 )747 else if (val1 == 0x30 && vendid == winbond) 738 748 kind = w83782d; 739 else if (val1 == 0x40 )749 else if (val1 == 0x40 && vendid == winbond && !is_isa) 740 750 kind = w83783s; 741 else if (val1 == 0x20 )751 else if (val1 == 0x20 && vendid == winbond) 742 752 kind = w83627hf; 753 else if (val1 == 0x20 && vendid == asus && !is_isa) 754 kind = as99127f; 743 755 else { 744 756 if (kind == 0) … … 761 773 type_name = "w83627hf"; 762 774 client_name = "W83627HF chip"; 775 } else if (kind == as99127f) { 776 type_name = "as99127f"; 777 client_name = "AS99127F chip"; 763 778 } else { 764 779 #ifdef DEBUG … … 1044 1059 IN_TO_REG(W83782D_INIT_IN_MAX_6)); 1045 1060 } 1046 if ((type == w83782d) || (type == w83627hf) ) {1061 if ((type == w83782d) || (type == w83627hf) || (type == as99127f)) { 1047 1062 w83781d_write_value(client,W83781D_REG_IN_MIN(7), 1048 1063 IN_TO_REG(W83781D_INIT_IN_MIN_7)); … … 1105 1120 data->in_min[i] = w83781d_read_value(client,W83781D_REG_IN_MIN(i)); 1106 1121 data->in_max[i] = w83781d_read_value(client,W83781D_REG_IN_MAX(i)); 1107 if((data->type != w83782d) && (data->type != w83627hf) && (i == 6)) 1122 if((data->type != w83782d) && (data->type != w83627hf) && 1123 (data->type != as99127f) && (i == 6)) 1108 1124 break; 1109 1125 } … … 1116 1132 data->pwm[i-1] = w83781d_read_value(client,W83781D_REG_PWM(i)); 1117 1133 if(((data->type == w83783s) || 1118 (((data->type == w83782d) || (data->type == w83627hf) ) &&1119 i2c_is_isa_client(client)))1134 (((data->type == w83782d) || (data->type == w83627hf) || 1135 data->type == as99127f) && i2c_is_isa_client(client))) 1120 1136 && i == 2) 1121 1137 break; … … 1147 1163 data->alarms = w83781d_read_value(client,W83781D_REG_ALARM1) + 1148 1164 (w83781d_read_value(client,W83781D_REG_ALARM2) << 8); 1149 if ((data->type == w83782d) || (data->type == w83627hf) ) {1165 if ((data->type == w83782d) || (data->type == w83627hf) || data->type == as99127f) { 1150 1166 data->alarms |= w83781d_read_value(client,W83781D_REG_ALARM3) << 16; 1151 1167 } lm-sensors/trunk/lib/chips.c
r526 r614 1537 1537 /* Cheat on 627HF for now - no separate #defines */ 1538 1538 { SENSORS_W83627HF_PREFIX, w83782d_features }, 1539 /* Cheat on1627HF for now - no separate #defines */ 1540 { SENSORS_AS99127F_PREFIX, w83782d_features }, 1539 1541 { SENSORS_ADM9240_PREFIX, adm9240_features }, 1540 1542 { SENSORS_DS1780_PREFIX, ds1780_features }, lm-sensors/trunk/lib/chips.h
r526 r614 367 367 /* Winbond W83782D chips */ 368 368 /* Cheat on 627HF for now - no separate #defines */ 369 /* Cheat on 127F for now - no separate #defines */ 369 370 370 371 #define SENSORS_W83782D_PREFIX "w83782d" 371 372 #define SENSORS_W83627HF_PREFIX "w83627hf" 373 #define SENSORS_AS99127F_PREFIX "as99127f" 372 374 373 375 #define SENSORS_W83782D_IN0 1 /* R */ lm-sensors/trunk/prog/detect/sensors-detect
r613 r614 232 232 } , 233 233 { 234 name => "Asus AS99127F", 235 driver => "w83781d", 236 i2c_addrs => [0x00..0x68,0x6a..0x7f], 237 i2c_driver_addrs => [0x20..0x2f], 238 i2c_detect => sub { w83781d_detect 4, @_}, 239 } , 240 { 234 241 name => "Genesys Logic GL518SM Revision 0x00", 235 242 driver => "gl518sm", … … 1265 1272 } 1266 1273 1267 # $_[0]: Chip to detect (0 = W83781D, 1 = W83782D, 2 = W83783S, 3 = W83627HF) 1274 # $_[0]: Chip to detect (0 = W83781D, 1 = W83782D, 2 = W83783S, 1275 # 3 = W83627HF, 4 = AS99127F) 1268 1276 # $_[1]: A reference to the file descriptor to access this chip. 1269 1277 # We may assume an i2c_set_slave_addr was already done. … … 1276 1284 # 0x4e: Vendor ID byte selection, and bank selection 1277 1285 # 0x4f: Vendor ID 1278 # 0x58: Device ID (only when in bank 0); both 0x10 and 0x11 is seen for 1279 # W83781D though Winbond documents 0x10 only. 1286 # 0x58: Device ID (only when in bank 0); ignore LSB. 1280 1287 # Note: Fails if the W8378xD is not in bank 0! 1281 1288 # Note: Detection overrules a previous LM78 detection … … 1287 1294 $reg1 = i2c_smbus_read_byte_data($file,0x4e); 1288 1295 $reg2 = i2c_smbus_read_byte_data($file,0x4f); 1289 return unless (($reg1 & 0x80) == 0x00 and $reg2 == 0xa3) or 1290 (($reg1 & 0x80) == 0x80 and $reg2 == 0x5c); 1296 if ($chip < 3) { 1297 return unless (($reg1 & 0x80) == 0x00 and $reg2 == 0xa3) or 1298 (($reg1 & 0x80) == 0x80 and $reg2 == 0x5c); 1299 } 1300 if ($chip == 4) { 1301 return unless (($reg1 & 0x80) == 0x00 and $reg2 == 0xc3) or 1302 (($reg1 & 0x80) == 0x80 and $reg2 == 0x12); 1303 } 1291 1304 return unless ($reg1 & 0x07) == 0x00; 1292 1305 $reg1 = i2c_smbus_read_byte_data($file,0x58) & 0xfe; … … 1295 1308 return if $chip == 2 and $reg1 != 0x40; 1296 1309 return if $chip == 3 and $reg1 != 0x20; 1310 return if $chip == 4 and $reg1 != 0x20; 1297 1311 $reg1 = i2c_smbus_read_byte_data($file,0x4a); 1298 1312 @res = (8); lm-sensors/trunk/prog/sensors/chips.c
r526 r614 812 812 813 813 is82d = (!strcmp(name->prefix,"w83782d")) || 814 (!strcmp(name->prefix,"w83627hf")); 814 (!strcmp(name->prefix,"w83627hf")) || 815 (!strcmp(name->prefix,"as99127f")); 815 816 is83s = !strcmp(name->prefix,"w83782s"); 816 817 if (!sensors_get_feature(*name,SENSORS_W83781D_ALARMS,&cur)) lm-sensors/trunk/prog/sensors/main.c
r533 r614 269 269 (!strcmp(name.prefix,"w83782d")) || 270 270 (!strcmp(name.prefix,"w83783s")) || 271 (!strcmp(name.prefix,"w83627hf"))) 271 (!strcmp(name.prefix,"w83627hf")) || 272 (!strcmp(name.prefix,"as99127f"))) 272 273 print_w83781d(&name); 273 274 else if (!strcmp(name.prefix,"maxilife-cg") ||
