Changeset 4565

Show
Ignore:
Timestamp:
07/06/07 17:44:28 (1 year ago)
Author:
khali
Message:

Add user-space support for it87 fan4 and fan5. Closes half of ticket #2227.

Files:

Legend:

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

    r4561 r4565  
    1313           Add support for the w83627ehf VID function 
    1414           Add support for the w83627ehf thermal sensor types 
     15           Add support for it87 fan4 and fan5 
    1516  Man page sensors.conf.5: Update the chip statement section 
    1617  Module i2c-nforce2: Add nForce MCP61, MCP65 support (2.6 backport) 
     
    4243                   Add support for the w83627ehf VID function 
    4344                   Add support for the w83627ehf thermal sensor types 
     45                   Add support for it87 fan4 and fan5 
    4446  Program sensors-detect: Stop Super-I/O probe after first family success 
    4547                          Fix SMSC DME1737 detection 
  • lm-sensors/trunk/kernel/chips/it87.c

    r4328 r4565  
    334334#define IT87_ALARM_FAN2 0x0002 
    335335#define IT87_ALARM_FAN3 0x0004 
     336#define IT87_ALARM_FAN4 0x0008 
     337#define IT87_ALARM_FAN5 0x0040 
    336338#define IT87_ALARM_TEMP1 0x00010000 
    337339#define IT87_ALARM_TEMP2 0x00020000 
  • lm-sensors/trunk/lib/chips.c

    r4563 r4565  
    41634163    { { SENSORS_IT87_FAN3, "fan3", NOMAP, NOMAP, R },  
    41644164                           IT87_SYSCTL_FAN3, VALUE(2), 0 }, 
     4165    { { SENSORS_IT87_FAN4, "fan4", NOMAP, NOMAP, R }, 
     4166                           NOSYSCTL, VALUE(2), 0 }, 
     4167    { { SENSORS_IT87_FAN5, "fan5", NOMAP, NOMAP, R }, 
     4168                           NOSYSCTL, VALUE(2), 0 }, 
    41654169    { { SENSORS_IT87_FAN1_MIN, "fan1_min", SENSORS_IT87_FAN1, SENSORS_IT87_FAN1,  
    41664170                               RW },  
     
    41724176                               RW },  
    41734177                               IT87_SYSCTL_FAN3, VALUE(1), 0 }, 
     4178    { { SENSORS_IT87_FAN4_MIN, "fan4_min", SENSORS_IT87_FAN4, SENSORS_IT87_FAN4, 
     4179                               RW }, 
     4180                               NOSYSCTL, VALUE(1), 0 }, 
     4181    { { SENSORS_IT87_FAN5_MIN, "fan5_min", SENSORS_IT87_FAN5, SENSORS_IT87_FAN5, 
     4182                               RW }, 
     4183                               NOSYSCTL, VALUE(1), 0 }, 
    41744184    { { SENSORS_IT87_TEMP1, "temp1", NOMAP, NOMAP, R },  
    41754185                            IT87_SYSCTL_TEMP1, VALUE(3), 1 }, 
  • lm-sensors/trunk/lib/chips.h

    r4563 r4565  
    16291629#define SENSORS_IT87_FAN2 32 /* R */ 
    16301630#define SENSORS_IT87_FAN3 33 /* R */ 
     1631#define SENSORS_IT87_FAN4 34 /* R */ 
     1632#define SENSORS_IT87_FAN5 35 /* R */ 
    16311633#define SENSORS_IT87_FAN1_MIN 41 /* RW */ 
    16321634#define SENSORS_IT87_FAN2_MIN 42 /* RW */ 
    16331635#define SENSORS_IT87_FAN3_MIN 43 /* RW */ 
     1636#define SENSORS_IT87_FAN4_MIN 44 /* RW */ 
     1637#define SENSORS_IT87_FAN5_MIN 45 /* RW */ 
    16341638#define SENSORS_IT87_TEMP1 51 /* R */ 
    16351639#define SENSORS_IT87_TEMP2 52 /* R */ 
  • lm-sensors/trunk/prog/sensors/chips.c

    r4563 r4565  
    32723272  char *label; 
    32733273  double cur, min, max, fdiv, sens; 
    3274   int alarms, valid; 
     3274  int alarms, valid, fan45; 
     3275 
     3276  /* The IT8716F, IT8718F and late revisions of the IT8712F have two 
     3277     additional (optional) fan inputs */ 
     3278  fan45 = strcmp(name->prefix, "it87"); 
    32753279 
    32763280  if (!sensors_get_feature(*name,SENSORS_IT87_ALARMS, &cur)) { 
     
    34313435  } 
    34323436  free(label); 
     3437 
     3438  if (fan45) { 
     3439    if (!sensors_get_label_and_valid(*name, SENSORS_IT87_FAN4, &label, &valid) && 
     3440        !sensors_get_feature(*name, SENSORS_IT87_FAN4, &cur) && 
     3441        !sensors_get_feature(*name, SENSORS_IT87_FAN4_MIN, &min)) { 
     3442      if (valid) { 
     3443        print_label(label, 10); 
     3444        printf("%4.0f RPM  (min = %4.0f RPM)                   %s\n", 
     3445               cur, min, alarms&IT87_ALARM_FAN4?"ALARM":""); 
     3446      } 
     3447    } 
     3448    free(label); 
     3449    if (!sensors_get_label_and_valid(*name, SENSORS_IT87_FAN5, &label, &valid) && 
     3450        !sensors_get_feature(*name, SENSORS_IT87_FAN5, &cur) && 
     3451        !sensors_get_feature(*name, SENSORS_IT87_FAN5_MIN, &min)) { 
     3452      if (valid) { 
     3453        print_label(label, 10); 
     3454        printf("%4.0f RPM  (min = %4.0f RPM)                   %s\n", 
     3455               cur, min, alarms&IT87_ALARM_FAN5?"ALARM":""); 
     3456      } 
     3457    } 
     3458    free(label); 
     3459  } 
    34333460 
    34343461  if (!sensors_get_label_and_valid(*name,SENSORS_IT87_TEMP1,&label,&valid) &&