Changeset 797
- Timestamp:
- 05/06/00 18:41:01 (9 years ago)
- Files:
-
- lm-sensors/trunk/CHANGES (modified) (1 diff)
- lm-sensors/trunk/doc/chips/SUMMARY (modified) (1 diff)
- lm-sensors/trunk/doc/chips/w83781d (modified) (7 diffs)
- lm-sensors/trunk/kernel/chips/w83781d.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/CHANGES
r796 r797 18 18 Module maxilife: Add support for Maxilife '99 (NBA) 19 19 Module via686a: Enable sensors if not enabled by BIOS 20 Module w83781d: Improve w83783s support 20 Module w83781d: Improve w83783s support, w83627hf always has 2 pwm 21 21 Program sensors-detect: Fix i801 detection 22 22 lm-sensors/trunk/doc/chips/SUMMARY
r785 r797 97 97 w83782d 3 9 3 2-4 pwm yes yes 98 98 w83783s 1-2 5-6 3 2 pwm yes no 99 w83627hf 3 9 3 2 -4pwm yes yes (LPC)99 w83627hf 3 9 3 2 pwm yes yes (LPC) 100 100 101 101 lm-sensors/trunk/doc/chips/w83781d
r787 r797 13 13 Prefix 'w83781d' 14 14 Addresses scanned: I2C 0x20 - 0x2f (inclusive), ISA 0x290 (8 I/O ports) 15 Datasheet: Publicly available at the Winbond website 15 Datasheet: Publicly available at the Winbond website (www.winbond.com.tw) 16 16 * Winbond W83782D 17 17 Prefix 'w83782d' … … 25 25 Prefix 'w83627hf' 26 26 Addresses scanned: I2C 0x20 - 0x2f (inclusive), ISA 0x290 (8 I/O ports) 27 Datasheet: Unavailable from Winbond27 Datasheet: Publicly available at the Winbond website 28 28 * Asus AS99127F 29 29 Prefix 'as99127f' … … 69 69 There is quite some difference between these chips, but they are similar 70 70 enough that it was sensible to put them together in one driver. 71 The W83627HF chip is assumed to be identical to the W83782D.72 The AS99127F chip is assumed to be identicalto an I2C-only W83782D.71 The W83627HF chip is assumed to be identical to the ISA W83782D. 72 The AS99127F chip is similar to an I2C-only W83782D. 73 73 74 74 Detection of these chips can sometimes be foiled because they can be in … … 100 100 triggered if the rotation speed has dropped below a programmable limit. FAN 101 101 readings can be divided by a programmable divider (1, 2, 4 or 8 for the 102 W83781D; 1, 2, 4, 8, 16, 32, 64 or 128 for the W83782D and W83783S) to give102 W83781D; 1, 2, 4, 8, 16, 32, 64 or 128 for the others) to give 103 103 the readings more range or accuracy. This is important because some FANs 104 104 report only one 'tick' each rotation, while others report two - making … … 128 128 129 129 In addition to the alarms described above, there is a CHAS alarm on the 130 W83781D and W83782Dwhich triggers if your computer case is open.130 chips which triggers if your computer case is open. 131 131 132 132 When an alarm goes off, you can be warned by a beeping signal through … … 458 458 459 459 460 Old documentation 461 ----------------- 462 463 464 Winbond 83781D driver 465 --------------------- 466 Supports the following Winbond chips: 467 468 Chip #vin #fanin #pwm #temp wchipid i2c ISA 469 ------------------------------------------------------------ 470 w83781d 7 3 0 3 0x10 yes yes 471 w83782d 9 3 2-4 3 0x30 yes yes 472 w83783s 5-6 3 2 1-2 0x40 yes no 473 474 475 Stability 476 --------- 477 w83781d: tested, stable 478 w83782d: beta tested, some minor bugs and things to do. 479 w83783s: untested 460 Miscellaneous documentation 461 =========================== 462 480 463 481 464 … … 511 494 512 495 513 The driver only updates its values each 1.5 seconds; reading it more often514 will do no harm, but will return 'old' values.515 516 496 517 497 TO DO: 518 498 ----- 519 499 782d programmable pins 520 783s temp2 (labeled as temp1 in data sheet) at different location521 than 781d/782d, not implemented yet.522 500 523 501 lm-sensors/trunk/kernel/chips/w83781d.c
r777 r797 869 869 if ((i = sensors_register_entry(new_client, 870 870 type_name, 871 kind == 872 w83781d ? 873 w83781d_dir_table_template : kind 874 == 875 w83783s ? 876 w83783s_dir_table_template : is_isa 877 ? w83782d_isa_dir_table_template : 878 w83782d_i2c_dir_table_template, 871 kind == w83781d ? 872 w83781d_dir_table_template : 873 kind == w83783s ? 874 w83783s_dir_table_template : 875 (is_isa || kind == w83627hf) ? 876 w83782d_isa_dir_table_template : 877 w83782d_i2c_dir_table_template, 879 878 THIS_MODULE)) < 0) { 880 879 err = i; … … 1027 1026 /* convert from ISA to LM75 I2C addresses */ 1028 1027 switch (reg & 0xff) { 1029 case 0x50: 1028 case 0x50: /* TEMP */ 1030 1029 res = 1031 1030 swap_bytes(i2c_smbus_read_word_data 1032 1031 (cl, 0)); 1033 1032 break; 1034 case 0x52: 1033 case 0x52: /* CONFIG */ 1035 1034 res = i2c_smbus_read_byte_data(cl, 1); 1036 1035 break; 1037 case 0x53: 1036 case 0x53: /* HYST */ 1038 1037 res = 1039 1038 swap_bytes(i2c_smbus_read_word_data 1040 1039 (cl, 2)); 1041 1040 break; 1042 case 0x55: 1041 case 0x55: /* OVER */ 1043 1042 default: 1044 1043 res = … … 1104 1103 } else { 1105 1104 /* switch to subclient */ 1106 cl = 1107 &(((struct w83781d_data *) (client->data))-> 1105 cl = &(((struct w83781d_data *) (client->data))-> 1108 1106 lm75[bank - 1]); 1109 1107 /* convert from ISA to LM75 I2C addresses */ 1110 1108 switch (reg & 0xff) { 1111 case 0x52: 1109 case 0x52: /* CONFIG */ 1112 1110 i2c_smbus_write_byte_data(cl, 1, 1113 1111 value & 0xff); 1114 1112 break; 1115 case 0x53: 1113 case 0x53: /* HYST */ 1116 1114 i2c_smbus_write_word_data(cl, 2, 1117 swap_bytes 1118 (value)); 1115 swap_bytes(value)); 1119 1116 break; 1120 case 0x55: 1117 case 0x55: /* OVER */ 1121 1118 i2c_smbus_write_word_data(cl, 3, 1122 swap_bytes 1123 (value)); 1119 swap_bytes(value)); 1124 1120 break; 1125 1121 } … … 1362 1358 w83781d_read_value(client, 1363 1359 W83781D_REG_PWM(i)); 1364 if ( 1365 ((data->type == w83783s) 1366 || 1367 (((data-> 1368 type == w83782d) 1369 || (data->type == w83627hf) 1370 || data->type == as99127f) 1371 && i2c_is_isa_client(client))) 1360 if (((data->type == w83783s) 1361 || (data->type == w83627hf) 1362 || (((data->type == w83782d) 1363 || (data->type == as99127f)) 1364 && i2c_is_isa_client(client))) 1372 1365 && i == 2) 1373 1366 break; … … 1760 1753 switch (results[0]) { 1761 1754 case 1: /* PII/Celeron diode */ 1762 tmp = 1763 w83781d_read_value(client, 1755 tmp = w83781d_read_value(client, 1764 1756 W83781D_REG_SCFG1); 1765 1757 w83781d_write_value(client, … … 1767 1759 tmp | BIT_SCFG1[nr - 1768 1760 1]); 1769 tmp = 1770 w83781d_read_value(client, 1761 tmp = w83781d_read_value(client, 1771 1762 W83781D_REG_SCFG2); 1772 1763 w83781d_write_value(client, … … 1777 1768 break; 1778 1769 case 2: /* 3904 */ 1779 tmp = 1780 w83781d_read_value(client, 1770 tmp = w83781d_read_value(client, 1781 1771 W83781D_REG_SCFG1); 1782 1772 w83781d_write_value(client, … … 1784 1774 tmp | BIT_SCFG1[nr - 1785 1775 1]); 1786 tmp = 1787 w83781d_read_value(client, 1776 tmp = w83781d_read_value(client, 1788 1777 W83781D_REG_SCFG2); 1789 1778 w83781d_write_value(client, … … 1794 1783 break; 1795 1784 case W83781D_DEFAULT_BETA: /* thermistor */ 1796 tmp = 1797 w83781d_read_value(client, 1785 tmp = w83781d_read_value(client, 1798 1786 W83781D_REG_SCFG1); 1799 1787 w83781d_write_value(client, … … 1879 1867 1880 1868 MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>, " 1881 "Philip Edelbrock <phil@netroedge .com>, "1869 "Philip Edelbrock <phil@netroedge.com>, " 1882 1870 "and Mark Studebaker <mdsxyz123@yahoo.com>"); 1883 1871 MODULE_DESCRIPTION("W83781D driver");
