Changeset 3071

Show
Ignore:
Timestamp:
09/07/05 21:21:44 (3 years ago)
Author:
khali
Message:

Drop the W83697HF support from the w83781d driver. It is better
supported by the super-I/O w83627hf driver. Patch from Grant Coady.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/doc/chips/SUMMARY

    r3021 r3071  
    229229        w83791d         3       10      5       5 pwm   yes     no 
    230230        w83627hf        3       9       3       2 pwm   yes     yes (LPC) 
    231         w83697hf        2       6       2       2 pwm   no      yes 
    232231 
    233232w83l785ts 
  • lm-sensors/trunk/doc/chips/w83781d

    r3007 r3071  
    77        W83791D support is BETA. 
    88        W83627HF support is complete but has not been well-tested. 
    9         W83697HF support is complete but has not been well-tested. 
    109        AS99127F support is BETA and has known problems due to lack of a 
    1110                 chip datasheet. SEE BELOW. 
     
    3231    Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports) 
    3332    Datasheet: http://www.winbond.com/PDF/sheet/w83627hf.pdf 
    34   * Winbond W83697HF 
    35     Prefix: 'w83697hf' 
    36     Addresses scanned: ISA 0x290 (8 I/O ports) 
    37     Datasheet: http://www.winbond.com/PDF/sheet/w83697hf.pdf 
    3833  * Asus AS99127F 
    3934    Prefix: 'as99127f' 
     
    6257  Ditto 
    6358* force_w83627hf: 
    64   Ditto 
    65 * force_w83697hf: 
    6659  Ditto 
    6760* force_as99127f: 
  • lm-sensors/trunk/kernel/chips/w83781d.c

    r3028 r3071  
    2828    as99127f rev.2 (type name = as99127f)       0x31    0x5ca3  yes     no 
    2929    w83627hf    9       3       2       3       0x21    0x5ca3  yes     yes(LPC) 
    30     w83697hf    8       2       2       2       0x60    0x5ca3  no      yes(LPC) 
    3130    w83781d     7       3       0       3       0x10-1  0x5ca3  yes     yes 
    3231    w83782d     9       3       2-4     3       0x30    0x5ca3  yes     yes 
     
    5756 
    5857/* Insmod parameters */ 
    59 SENSORS_INSMOD_7(w83781d, w83782d, w83783s, w83627hf, as99127f, w83697hf, w83791d); 
     58SENSORS_INSMOD_6(w83781d, w83782d, w83783s, w83627hf, as99127f, w83791d); 
    6059SENSORS_MODULE_PARM(force_subclients, "List of subclient addresses: " \ 
    6160                      "{bus, clientaddr, subclientaddr1, subclientaddr2}"); 
     
    159158#define W83781D_REG_PWM(type, nr) (((type) == w83791d) ? \ 
    160159                                         regpwm_w83791d[(nr) - 1] : \ 
    161                                    ((type) == w83697hf) ? \ 
    162                                          (((nr) * 2) - 1) : \ 
    163160                                         regpwm[(nr) - 1]) 
    164161 
     
    706703}; 
    707704 
    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  
    752705 
    753706/* This function is called when: 
     
    888841                else if (val1 == 0x31 && !is_isa && address >= 0x28) 
    889842                        kind = as99127f; 
    890                 else if (val1 == 0x60 && vendid == winbond && is_isa) 
    891                         kind = w83697hf; 
    892843                else { 
    893844                        if (kind == 0) 
     
    915866                type_name = "as99127f"; 
    916867                client_name = "AS99127F chip"; 
    917         } else if (kind == w83697hf) { 
    918                 type_name = "w83697hf"; 
    919                 client_name = "W83697HF chip"; 
    920868        } else if (kind == w83791d) { 
    921869                type_name = "w83791d"; 
     
    1027975                                        (kind == w83783s) ? 
    1028976                                           w83783s_dir_table_template : 
    1029                                         (kind == w83697hf) ? 
    1030                                            w83697hf_dir_table_template : 
    1031977                                        (kind == w83791d ) ? 
    1032978                                            w83791d_dir_table_template : 
     
    12851231                                        data->sens[i - 1] = 2; 
    12861232                        } 
    1287                         if ((type == w83783s || type == w83697hf) && (i == 2)
     1233                        if (type == w83783s && i == 2
    12881234                                break; 
    12891235                } 
     
    13201266        if (init && type != as99127f) { 
    13211267                w83781d_write_value(client, W83781D_REG_TEMP2_CONFIG, 0x00); 
    1322                 if (type != w83783s && type != w83697hf) { 
     1268                if (type != w83783s) { 
    13231269                        w83781d_write_value(client, W83781D_REG_TEMP3_CONFIG, 
    13241270                                            0x00); 
     
    13531299 
    13541300               for (i = 0; i <= 9; i++) { 
    1355                        if ((data->type == w83783s || data->type == w83697hf
     1301                       if ((data->type == w83783s
    13561302                           && (i == 1)) 
    13571303                               continue;       /* 783S has no in1 */ 
     
    13751321                                              W83781D_REG_IN_MAX(i)); 
    13761322                       } 
    1377                        if ((data->type != w83782d) && (data->type != w83697hf) 
     1323                       if ((data->type != w83782d) 
    13781324                           && (data->type != w83627hf) && (i == 6) 
    13791325                           && (data->type != w83791d)) 
     
    13981344                               if (((data->type == w83783s) 
    13991345                                    || (data->type == w83627hf) 
    1400                                     || (data->type == w83697hf) 
    14011346                                    || ((data->type == w83782d) 
    14021347                                       && i2c_is_isa_client(client))) 
     
    14201365               data->temp_add_hyst[0] = 
    14211366                   w83781d_read_value(client, W83781D_REG_TEMP2_HYST); 
    1422                if (data->type != w83783s && data->type != w83697hf) { 
     1367               if (data->type != w83783s) { 
    14231368                       data->temp_add[1] = 
    14241369                           w83781d_read_value(client, W83781D_REG_TEMP3); 
     
    14291374               } 
    14301375               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; 
    14371379               data->fan_div[0] = (i >> 4) & 0x03; 
    14381380               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; 
    14431383               if ((data->type != w83781d) && (data->type != as99127f)) { 
    14441384                       i = w83781d_read_value(client, W83781D_REG_VBAT); 
    14451385                       data->fan_div[0] |= (i >> 3) & 0x04; 
    14461386                       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; 
    14491388               } 
    14501389               data->alarms = 
     
    14521391                                      W83781D_REG_ALARM1) + 
    14531392                   (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)) { 
    14561394                       data->alarms |= 
    14571395                           w83781d_read_value(client, 
     
    16851623} 
    16861624 
    1687 /* w83697hf only has two fans */ 
    16881625void w83781d_fan_div(struct i2c_client *client, int operation, 
    16891626                     int ctl_name, int *nrels_mag, long *results) 
     
    16981635                results[0] = DIV_FROM_REG(data->fan_div[0]); 
    16991636                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; 
    17061639        } else if (operation == SENSORS_PROC_REAL_WRITE) { 
    17071640                old = w83781d_read_value(client, W83781D_REG_VID_FANDIV); 
     
    17111644                            w83781d_read_value(client, W83781D_REG_VBAT); 
    17121645                } 
    1713                 if (*nrels_mag >= 3 && data->type != w83697hf) { 
     1646                if (*nrels_mag >= 3) { 
    17141647                        data->fan_div[2] = 
    17151648                            DIV_TO_REG(results[2], data->type);