Changeset 797

Show
Ignore:
Timestamp:
05/06/00 18:41:01 (9 years ago)
Author:
mds
Message:

(mds) w83627hf only has 2 pwm whether on ISA or I2C bus.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/CHANGES

    r796 r797  
    1818  Module maxilife: Add support for Maxilife '99 (NBA) 
    1919  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 
    2121  Program sensors-detect: Fix i801 detection 
    2222 
  • lm-sensors/trunk/doc/chips/SUMMARY

    r785 r797  
    9797        w83782d         3       9       3       2-4 pwm yes     yes 
    9898        w83783s         1-2     5-6     3       2 pwm   yes     no 
    99         w83627hf        3       9       3       2-4 pwm       yes     yes (LPC) 
     99        w83627hf        3       9       3       2 pwm yes     yes (LPC) 
    100100 
    101101 
  • lm-sensors/trunk/doc/chips/w83781d

    r787 r797  
    1313    Prefix 'w83781d' 
    1414    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) 
    1616  * Winbond W83782D 
    1717    Prefix 'w83782d' 
     
    2525    Prefix 'w83627hf' 
    2626    Addresses scanned: I2C 0x20 - 0x2f (inclusive), ISA 0x290 (8 I/O ports) 
    27     Datasheet: Unavailable from Winbond 
     27    Datasheet: Publicly available at the Winbond website 
    2828  * Asus AS99127F 
    2929    Prefix 'as99127f' 
     
    6969There is quite some difference between these chips, but they are similar 
    7070enough 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 identical to an I2C-only W83782D. 
     71The W83627HF chip is assumed to be identical to the ISA W83782D. 
     72The AS99127F chip is similar to an I2C-only W83782D. 
    7373 
    7474Detection of these chips can sometimes be foiled because they can be in 
     
    100100triggered if the rotation speed has dropped below a programmable limit. FAN  
    101101readings 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 give 
     102W83781D; 1, 2, 4, 8, 16, 32, 64 or 128 for the others) to give 
    103103the readings more range or accuracy. This is important because some FANs 
    104104report only one 'tick' each rotation, while others report two - making 
     
    128128 
    129129In addition to the alarms described above, there is a CHAS alarm on the 
    130 W83781D and W83782D which triggers if your computer case is open.  
     130chips which triggers if your computer case is open.  
    131131 
    132132When an alarm goes off, you can be warned by a beeping signal through 
     
    458458 
    459459 
    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 
     460Miscellaneous documentation 
     461=========================== 
     462 
    480463 
    481464 
     
    511494 
    512495 
    513 The driver only updates its values each 1.5 seconds; reading it more often 
    514 will do no harm, but will return 'old' values. 
    515  
    516496 
    517497TO DO: 
    518498----- 
    519499 782d programmable pins 
    520  783s temp2 (labeled as temp1 in data sheet) at different location 
    521       than 781d/782d, not implemented yet. 
    522500 
    523501 
  • lm-sensors/trunk/kernel/chips/w83781d.c

    r777 r797  
    869869        if ((i = sensors_register_entry(new_client, 
    870870                                        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, 
    879878                                        THIS_MODULE)) < 0) { 
    880879                err = i; 
     
    10271026                        /* convert from ISA to LM75 I2C addresses */ 
    10281027                        switch (reg & 0xff) { 
    1029                         case 0x50: 
     1028                        case 0x50: /* TEMP */ 
    10301029                                res = 
    10311030                                    swap_bytes(i2c_smbus_read_word_data 
    10321031                                               (cl, 0)); 
    10331032                                break; 
    1034                         case 0x52: 
     1033                        case 0x52: /* CONFIG */ 
    10351034                                res = i2c_smbus_read_byte_data(cl, 1); 
    10361035                                break; 
    1037                         case 0x53: 
     1036                        case 0x53: /* HYST */ 
    10381037                                res = 
    10391038                                    swap_bytes(i2c_smbus_read_word_data 
    10401039                                               (cl, 2)); 
    10411040                                break; 
    1042                         case 0x55: 
     1041                        case 0x55: /* OVER */ 
    10431042                        default: 
    10441043                                res = 
     
    11041103                } else { 
    11051104                        /* switch to subclient */ 
    1106                         cl = 
    1107                             &(((struct w83781d_data *) (client->data))-> 
     1105                        cl = &(((struct w83781d_data *) (client->data))-> 
    11081106                              lm75[bank - 1]); 
    11091107                        /* convert from ISA to LM75 I2C addresses */ 
    11101108                        switch (reg & 0xff) { 
    1111                         case 0x52: 
     1109                        case 0x52: /* CONFIG */ 
    11121110                                i2c_smbus_write_byte_data(cl, 1, 
    11131111                                                          value & 0xff); 
    11141112                                break; 
    1115                         case 0x53: 
     1113                        case 0x53: /* HYST */ 
    11161114                                i2c_smbus_write_word_data(cl, 2, 
    1117                                                           swap_bytes 
    1118                                                           (value)); 
     1115                                                          swap_bytes(value)); 
    11191116                                break; 
    1120                         case 0x55: 
     1117                        case 0x55: /* OVER */ 
    11211118                                i2c_smbus_write_word_data(cl, 3, 
    1122                                                           swap_bytes 
    1123                                                           (value)); 
     1119                                                          swap_bytes(value)); 
    11241120                                break; 
    11251121                        } 
     
    13621358                                    w83781d_read_value(client, 
    13631359                                                       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))) 
    13721365                                    && i == 2) 
    13731366                                        break; 
     
    17601753                        switch (results[0]) { 
    17611754                        case 1: /* PII/Celeron diode */ 
    1762                                 tmp = 
    1763                                     w83781d_read_value(client, 
     1755                                tmp = w83781d_read_value(client, 
    17641756                                                       W83781D_REG_SCFG1); 
    17651757                                w83781d_write_value(client, 
     
    17671759                                                    tmp | BIT_SCFG1[nr - 
    17681760                                                                    1]); 
    1769                                 tmp = 
    1770                                     w83781d_read_value(client, 
     1761                                tmp = w83781d_read_value(client, 
    17711762                                                       W83781D_REG_SCFG2); 
    17721763                                w83781d_write_value(client, 
     
    17771768                                break; 
    17781769                        case 2: /* 3904 */ 
    1779                                 tmp = 
    1780                                     w83781d_read_value(client, 
     1770                                tmp = w83781d_read_value(client, 
    17811771                                                       W83781D_REG_SCFG1); 
    17821772                                w83781d_write_value(client, 
     
    17841774                                                    tmp | BIT_SCFG1[nr - 
    17851775                                                                    1]); 
    1786                                 tmp = 
    1787                                     w83781d_read_value(client, 
     1776                                tmp = w83781d_read_value(client, 
    17881777                                                       W83781D_REG_SCFG2); 
    17891778                                w83781d_write_value(client, 
     
    17941783                                break; 
    17951784                        case W83781D_DEFAULT_BETA:      /* thermistor */ 
    1796                                 tmp = 
    1797                                     w83781d_read_value(client, 
     1785                                tmp = w83781d_read_value(client, 
    17981786                                                       W83781D_REG_SCFG1); 
    17991787                                w83781d_write_value(client, 
     
    18791867 
    18801868MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>, " 
    1881               "Philip Edelbrock <phil@netroedge .com>, " 
     1869              "Philip Edelbrock <phil@netroedge.com>, " 
    18821870              "and Mark Studebaker <mdsxyz123@yahoo.com>"); 
    18831871MODULE_DESCRIPTION("W83781D driver");