Changeset 3071
- Timestamp:
- 09/07/05 21:21:44 (3 years ago)
- Files:
-
- 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) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/doc/chips/SUMMARY
r3021 r3071 229 229 w83791d 3 10 5 5 pwm yes no 230 230 w83627hf 3 9 3 2 pwm yes yes (LPC) 231 w83697hf 2 6 2 2 pwm no yes232 231 233 232 w83l785ts lm-sensors/trunk/doc/chips/w83781d
r3007 r3071 7 7 W83791D support is BETA. 8 8 W83627HF support is complete but has not been well-tested. 9 W83697HF support is complete but has not been well-tested.10 9 AS99127F support is BETA and has known problems due to lack of a 11 10 chip datasheet. SEE BELOW. … … 32 31 Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports) 33 32 Datasheet: http://www.winbond.com/PDF/sheet/w83627hf.pdf 34 * Winbond W83697HF35 Prefix: 'w83697hf'36 Addresses scanned: ISA 0x290 (8 I/O ports)37 Datasheet: http://www.winbond.com/PDF/sheet/w83697hf.pdf38 33 * Asus AS99127F 39 34 Prefix: 'as99127f' … … 62 57 Ditto 63 58 * force_w83627hf: 64 Ditto65 * force_w83697hf:66 59 Ditto 67 60 * force_as99127f: lm-sensors/trunk/kernel/chips/w83781d.c
r3028 r3071 28 28 as99127f rev.2 (type name = as99127f) 0x31 0x5ca3 yes no 29 29 w83627hf 9 3 2 3 0x21 0x5ca3 yes yes(LPC) 30 w83697hf 8 2 2 2 0x60 0x5ca3 no yes(LPC)31 30 w83781d 7 3 0 3 0x10-1 0x5ca3 yes yes 32 31 w83782d 9 3 2-4 3 0x30 0x5ca3 yes yes … … 57 56 58 57 /* Insmod parameters */ 59 SENSORS_INSMOD_ 7(w83781d, w83782d, w83783s, w83627hf, as99127f, w83697hf, w83791d);58 SENSORS_INSMOD_6(w83781d, w83782d, w83783s, w83627hf, as99127f, w83791d); 60 59 SENSORS_MODULE_PARM(force_subclients, "List of subclient addresses: " \ 61 60 "{bus, clientaddr, subclientaddr1, subclientaddr2}"); … … 159 158 #define W83781D_REG_PWM(type, nr) (((type) == w83791d) ? \ 160 159 regpwm_w83791d[(nr) - 1] : \ 161 ((type) == w83697hf) ? \162 (((nr) * 2) - 1) : \163 160 regpwm[(nr) - 1]) 164 161 … … 706 703 }; 707 704 708 /* similar to w83782d but no fan3, no vid */709 static ctl_table w83697hf_dir_table_template[] = {710 {W83781D_SYSCTL_IN0, "in0", NULL, 0, 0644, NULL, &i2c_proc_real,711 &i2c_sysctl_real, NULL, &w83781d_in},712 /* no in1 to maintain compatibility with 781d and 782d. */713 {W83781D_SYSCTL_IN2, "in2", NULL, 0, 0644, NULL, &i2c_proc_real,714 &i2c_sysctl_real, NULL, &w83781d_in},715 {W83781D_SYSCTL_IN3, "in3", NULL, 0, 0644, NULL, &i2c_proc_real,716 &i2c_sysctl_real, NULL, &w83781d_in},717 {W83781D_SYSCTL_IN4, "in4", NULL, 0, 0644, NULL, &i2c_proc_real,718 &i2c_sysctl_real, NULL, &w83781d_in},719 {W83781D_SYSCTL_IN5, "in5", NULL, 0, 0644, NULL, &i2c_proc_real,720 &i2c_sysctl_real, NULL, &w83781d_in},721 {W83781D_SYSCTL_IN6, "in6", NULL, 0, 0644, NULL, &i2c_proc_real,722 &i2c_sysctl_real, NULL, &w83781d_in},723 {W83781D_SYSCTL_IN7, "in7", NULL, 0, 0644, NULL, &i2c_proc_real,724 &i2c_sysctl_real, NULL, &w83781d_in},725 {W83781D_SYSCTL_IN8, "in8", NULL, 0, 0644, NULL, &i2c_proc_real,726 &i2c_sysctl_real, NULL, &w83781d_in},727 {W83781D_SYSCTL_FAN1, "fan1", NULL, 0, 0644, NULL, &i2c_proc_real,728 &i2c_sysctl_real, NULL, &w83781d_fan},729 {W83781D_SYSCTL_FAN2, "fan2", NULL, 0, 0644, NULL, &i2c_proc_real,730 &i2c_sysctl_real, NULL, &w83781d_fan},731 {W83781D_SYSCTL_TEMP1, "temp1", NULL, 0, 0644, NULL, &i2c_proc_real,732 &i2c_sysctl_real, NULL, &w83781d_temp},733 {W83781D_SYSCTL_TEMP2, "temp2", NULL, 0, 0644, NULL, &i2c_proc_real,734 &i2c_sysctl_real, NULL, &w83781d_temp_add},735 {W83781D_SYSCTL_FAN_DIV, "fan_div", NULL, 0, 0644, NULL, &i2c_proc_real,736 &i2c_sysctl_real, NULL, &w83781d_fan_div},737 {W83781D_SYSCTL_ALARMS, "alarms", NULL, 0, 0444, NULL, &i2c_proc_real,738 &i2c_sysctl_real, NULL, &w83781d_alarms},739 {W83781D_SYSCTL_BEEP, "beep", NULL, 0, 0644, NULL, &i2c_proc_real,740 &i2c_sysctl_real, NULL, &w83781d_beep},741 {W83781D_SYSCTL_PWM1, "pwm1", NULL, 0, 0644, NULL, &i2c_proc_real,742 &i2c_sysctl_real, NULL, &w83781d_pwm},743 {W83781D_SYSCTL_PWM2, "pwm2", NULL, 0, 0644, NULL, &i2c_proc_real,744 &i2c_sysctl_real, NULL, &w83781d_pwm},745 {W83781D_SYSCTL_SENS1, "sensor1", NULL, 0, 0644, NULL, &i2c_proc_real,746 &i2c_sysctl_real, NULL, &w83781d_sens},747 {W83781D_SYSCTL_SENS2, "sensor2", NULL, 0, 0644, NULL, &i2c_proc_real,748 &i2c_sysctl_real, NULL, &w83781d_sens},749 {0}750 };751 752 705 753 706 /* This function is called when: … … 888 841 else if (val1 == 0x31 && !is_isa && address >= 0x28) 889 842 kind = as99127f; 890 else if (val1 == 0x60 && vendid == winbond && is_isa)891 kind = w83697hf;892 843 else { 893 844 if (kind == 0) … … 915 866 type_name = "as99127f"; 916 867 client_name = "AS99127F chip"; 917 } else if (kind == w83697hf) {918 type_name = "w83697hf";919 client_name = "W83697HF chip";920 868 } else if (kind == w83791d) { 921 869 type_name = "w83791d"; … … 1027 975 (kind == w83783s) ? 1028 976 w83783s_dir_table_template : 1029 (kind == w83697hf) ?1030 w83697hf_dir_table_template :1031 977 (kind == w83791d ) ? 1032 978 w83791d_dir_table_template : … … 1285 1231 data->sens[i - 1] = 2; 1286 1232 } 1287 if ( (type == w83783s || type == w83697hf) && (i == 2))1233 if (type == w83783s && i == 2) 1288 1234 break; 1289 1235 } … … 1320 1266 if (init && type != as99127f) { 1321 1267 w83781d_write_value(client, W83781D_REG_TEMP2_CONFIG, 0x00); 1322 if (type != w83783s && type != w83697hf) {1268 if (type != w83783s) { 1323 1269 w83781d_write_value(client, W83781D_REG_TEMP3_CONFIG, 1324 1270 0x00); … … 1353 1299 1354 1300 for (i = 0; i <= 9; i++) { 1355 if ((data->type == w83783s || data->type == w83697hf)1301 if ((data->type == w83783s) 1356 1302 && (i == 1)) 1357 1303 continue; /* 783S has no in1 */ … … 1375 1321 W83781D_REG_IN_MAX(i)); 1376 1322 } 1377 if ((data->type != w83782d) && (data->type != w83697hf)1323 if ((data->type != w83782d) 1378 1324 && (data->type != w83627hf) && (i == 6) 1379 1325 && (data->type != w83791d)) … … 1398 1344 if (((data->type == w83783s) 1399 1345 || (data->type == w83627hf) 1400 || (data->type == w83697hf)1401 1346 || ((data->type == w83782d) 1402 1347 && i2c_is_isa_client(client))) … … 1420 1365 data->temp_add_hyst[0] = 1421 1366 w83781d_read_value(client, W83781D_REG_TEMP2_HYST); 1422 if (data->type != w83783s && data->type != w83697hf) {1367 if (data->type != w83783s) { 1423 1368 data->temp_add[1] = 1424 1369 w83781d_read_value(client, W83781D_REG_TEMP3); … … 1429 1374 } 1430 1375 i = w83781d_read_value(client, W83781D_REG_VID_FANDIV); 1431 if (data->type != w83697hf) { 1432 data->vid = i & 0x0f; 1433 data->vid |= 1434 (w83781d_read_value(client, W83781D_REG_CHIPID) & 0x01) 1435 << 4; 1436 } 1376 data->vid = i & 0x0f; 1377 data->vid |= (w83781d_read_value(client, 1378 W83781D_REG_CHIPID) & 0x01) << 4; 1437 1379 data->fan_div[0] = (i >> 4) & 0x03; 1438 1380 data->fan_div[1] = (i >> 6) & 0x03; 1439 if (data->type != w83697hf) { 1440 data->fan_div[2] = (w83781d_read_value(client, 1441 W83781D_REG_PIN) >> 6) & 0x03; 1442 } 1381 data->fan_div[2] = (w83781d_read_value(client, 1382 W83781D_REG_PIN) >> 6) & 0x03; 1443 1383 if ((data->type != w83781d) && (data->type != as99127f)) { 1444 1384 i = w83781d_read_value(client, W83781D_REG_VBAT); 1445 1385 data->fan_div[0] |= (i >> 3) & 0x04; 1446 1386 data->fan_div[1] |= (i >> 4) & 0x04; 1447 if (data->type != w83697hf) 1448 data->fan_div[2] |= (i >> 5) & 0x04; 1387 data->fan_div[2] |= (i >> 5) & 0x04; 1449 1388 } 1450 1389 data->alarms = … … 1452 1391 W83781D_REG_ALARM1) + 1453 1392 (w83781d_read_value(client, W83781D_REG_ALARM2) << 8); 1454 if ((data->type == w83782d) || (data->type == w83627hf) || 1455 (data->type == w83697hf)) { 1393 if ((data->type == w83782d) || (data->type == w83627hf)) { 1456 1394 data->alarms |= 1457 1395 w83781d_read_value(client, … … 1685 1623 } 1686 1624 1687 /* w83697hf only has two fans */1688 1625 void w83781d_fan_div(struct i2c_client *client, int operation, 1689 1626 int ctl_name, int *nrels_mag, long *results) … … 1698 1635 results[0] = DIV_FROM_REG(data->fan_div[0]); 1699 1636 results[1] = DIV_FROM_REG(data->fan_div[1]); 1700 if (data->type == w83697hf) { 1701 *nrels_mag = 2; 1702 } else { 1703 results[2] = DIV_FROM_REG(data->fan_div[2]); 1704 *nrels_mag = 3; 1705 } 1637 results[2] = DIV_FROM_REG(data->fan_div[2]); 1638 *nrels_mag = 3; 1706 1639 } else if (operation == SENSORS_PROC_REAL_WRITE) { 1707 1640 old = w83781d_read_value(client, W83781D_REG_VID_FANDIV); … … 1711 1644 w83781d_read_value(client, W83781D_REG_VBAT); 1712 1645 } 1713 if (*nrels_mag >= 3 && data->type != w83697hf) {1646 if (*nrels_mag >= 3) { 1714 1647 data->fan_div[2] = 1715 1648 DIV_TO_REG(results[2], data->type);
