Changeset 4154

Show
Ignore:
Timestamp:
09/07/06 21:51:25 (2 years ago)
Author:
khali
Message:

vt1211 fixes:
* No in6
* More inputs can be missing (depends on UCH config)

Files:

Legend:

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

    r4153 r4154  
    3434                     Add VT8237A and VT8251 
    3535  Module lm83: Add LM82 support (2.6 backport) 
     36  Module vt1211: The VT1211 has no in6 
    3637  Module w83781d: Use real-time alarm registers when possible (2.6 backport) 
    3738                  Add specific alarm and beep defines for the W83791D 
     
    5859                   Add w83793 support (Yuan Mu) 
    5960                   The adt7463 may not have in4 (#2119) 
     61                   Hide more vt1211 missing input errors 
    6062  Program sensors-detect: Add ServerWorks HT-1000 SMBus detection 
    6163                          Add ATI IXP200/300/400 SMBus detection 
  • lm-sensors/trunk/doc/chips/SUMMARY

    r4063 r4154  
    230230 
    231231vt1211 
    232         vt1211          2-7     2-7   2       2       no      yes (LPC) 
     232        vt1211          2-7     1-6   2       2       no      yes (LPC) 
    233233 
    234234vt8231 
  • lm-sensors/trunk/doc/chips/vt1211

    r3007 r4154  
    2929 
    3030We define the sensors as follows. Somewhat convoluted to minimize 
    31 changes from via686a. Temp1 and in6 are unimplemented in the vt1211 
    32 chip but are included in the driver. 
     31changes from via686a. 
    3332 
    3433        Sensor          Voltage Mode    Temp Mode       uch_config bit 
     
    4241        UCH5            in4             temp7           0x40 (64) 
    4342        3.3V            in5 
    44         -12V            in6 
    4543 
    4644As noted above, 5 of the sensors are "universal channels" and can 
  • lm-sensors/trunk/etc/sensors.conf.eg

    r4135 r4154  
    20392039chip "vt1211-*" 
    20402040# 
    2041 # in6 is not implemented in vt1211 
    2042 # 
    20432041#                                                       1 for temp, 0 for volt. 
    20442042#       Sensor          Voltage Mode    Temp Mode       config bit 
  • lm-sensors/trunk/kernel/chips/vt1211.c

    r3246 r4154  
    108108        UCH5            in4             temp7 
    109109        3.3V            in5 
    110         -12V            in6                     not in vt1211 
    111110*/ 
    112111 
    113 /* ins numbered 0-6 */ 
     112/* ins numbered 0-5 */ 
    114113#define VT1211_REG_IN_MAX(nr) ((nr)==0 ? 0x3d : 0x29 + ((nr) * 2)) 
    115114#define VT1211_REG_IN_MIN(nr) ((nr)==0 ? 0x3e : 0x2a + ((nr) * 2)) 
     
    141140#define VT1211_REG_TEMP2_CONFIG 0x4c 
    142141 
    143 /* temps 1-7; voltages 0-6 */ 
     142/* temps 1-7; voltages 0-5 */ 
    144143#define ISTEMP(i, ch_config) ((i) == 1 ? 1 : \ 
    145144                              (i) == 3 ? 1 : \ 
     
    184183        unsigned long last_updated;     /* In jiffies */ 
    185184 
    186         u8 in[7];             /* Register value */ 
    187         u8 in_max[7];         /* Register value */ 
    188         u8 in_min[7];         /* Register value */ 
     185        u8 in[6];             /* Register value */ 
     186        u8 in_max[6];         /* Register value */ 
     187        u8 in_min[6];         /* Register value */ 
    189188        u16 temp[7];            /* Register value 10 bit */ 
    190189        u8 temp_over[7];        /* Register value */ 
     
    247246#define VT1211_SYSCTL_IN4 1004 
    248247#define VT1211_SYSCTL_IN5 1005 
    249 #define VT1211_SYSCTL_IN6 1006 
    250248#define VT1211_SYSCTL_FAN1 1101 
    251249#define VT1211_SYSCTL_FAN2 1102 
     
    273271#define VT1211_ALARM_FAN2 0x80 
    274272#define VT1211_ALARM_IN4 0x100 
    275 #define VT1211_ALARM_IN6 0x200 
    276273#define VT1211_ALARM_TEMP2 0x800 
    277274#define VT1211_ALARM_CHAS 0x1000 
     
    299296        {VT1211_SYSCTL_IN5, "in5", NULL, 0, 0644, NULL, &i2c_proc_real, 
    300297         &i2c_sysctl_real, NULL, &vt1211_in}, 
    301 /* 
    302     datasheet says these are reserved 
    303         {VT1211_SYSCTL_IN6, "in6", NULL, 0, 0644, NULL, &i2c_proc_real, 
    304          &i2c_sysctl_real, NULL, &vt1211_in}, 
    305 */ 
    306298        {VT1211_SYSCTL_TEMP1, "temp1", NULL, 0, 0644, NULL, 
    307299         &i2c_proc_real, &i2c_sysctl_real, NULL, &vt1211_temp}, 
  • lm-sensors/trunk/prog/sensors/chips.c

    r4133 r4154  
    44244424      printf("%+6.2f V  (min = %+6.2f V, max = %+6.2f V)   %s\n", 
    44254425             cur,min,max,alarms&VT1211_ALARM_IN2?"ALARM":""); 
    4426     } else 
     4426    } else if (err != -SENSORS_ERR_PROC) 
    44274427      printf("ERROR: Can't get IN2 data!\n"); 
    44284428  } 
     
    44374437      printf("%+6.2f V  (min = %+6.2f V, max = %+6.2f V)   %s\n", 
    44384438             cur,min,max,alarms&VT1211_ALARM_IN3?"ALARM":""); 
    4439     } else 
     4439    } else if (err != -SENSORS_ERR_PROC) 
    44404440      printf("ERROR: Can't get IN3 data!\n"); 
    44414441  } 
     
    44504450      printf("%+6.2f V  (min = %+6.2f V, max = %+6.2f V)   %s\n", 
    44514451             cur,min,max,alarms&VT1211_ALARM_IN4?"ALARM":""); 
    4452     } else 
     4452    } else if (err != -SENSORS_ERR_PROC) 
    44534453      printf("ERROR: Can't get IN4 data!\n"); 
    44544454  } 
     
    44634463      printf("%+6.2f V  (min = %+6.2f V, max = %+6.2f V)   %s\n", 
    44644464             cur,min,max,alarms&VT1211_ALARM_IN5?"ALARM":""); 
    4465     } else 
    4466       printf("ERROR: Can't get IN5 data!\n"); 
    4467   } 
    4468   free(label); 
     4465    } 
     4466  } 
     4467  free(label); 
     4468 
    44694469  if (sensors_get_label_and_valid(*name,SENSORS_VT1211_FAN1,&label,&valid)) { 
    44704470    printf("ERROR: Can't get FAN1 config!\n"); 
     
    44934493  } 
    44944494  free(label); 
     4495 
    44954496  if (sensors_get_label_and_valid(*name,SENSORS_VT1211_TEMP1,&label,&valid)) { 
    44964497    printf("ERROR: Can't get TEMP1 config!\n"); 
     
    45284529      print_temp_info( cur, max, min, HYST, 1, 0); 
    45294530      printf(" %s\n", alarms & VT1211_ALARM_TEMP3 ? "ALARM" : "" ); 
    4530     } else 
     4531    } else if (err != -SENSORS_ERR_PROC) 
    45314532      printf("ERROR: Can't get TEMP3 data!\n"); 
    45324533  } 
     
    45414542      print_temp_info( cur, max, min, HYST, 1, 0); 
    45424543      printf(" %s\n", alarms & VT1211_ALARM_TEMP4 ? "ALARM" : "" ); 
    4543     } else 
     4544    } else if (err != -SENSORS_ERR_PROC) 
    45444545      printf("ERROR: Can't get TEMP4 data!\n"); 
    45454546  }