Changeset 3246

Show
Ignore:
Timestamp:
01/27/06 22:02:09 (3 years ago)
Author:
ruik
Message:

Add back the temp1 in vt1211, patch from Juerg Haefliger <juergh@gmail.com>

This patch enables the reading of temp1 (Reading3) from the VT1211.
Reading3 returns the V1211's internal temperature.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/etc/sensors.conf.eg

    r3203 r3246  
    19241924chip "vt1211-*" 
    19251925# 
    1926 # temp1 and in6 are not implemented in vt1211 
     1926# in6 is not implemented in vt1211 
    19271927# 
    19281928#                                                       1 for temp, 0 for volt. 
     
    19301930#       --------        ------------    ---------       -------------- 
    19311931#       Reading 1                       temp3 
     1932#       Reading 3                       temp1            
    19321933#       UCH1/Reading2   in0             temp2           0x04 (4) 
    19331934#       UCH2            in1             temp4           0x08 (8) 
     
    19601961    label in5 "+3.3V" 
    19611962 
     1963    label temp1 "Int Temp" 
    19621964    label temp2 "MB1 Temp" 
    19631965    label temp3 "Proc Temp" 
  • lm-sensors/trunk/kernel/chips/vt1211.c

    r3190 r3246  
    100100        Sensor          Voltage Mode    Temp Mode 
    101101        --------        ------------    --------- 
    102         Reading 1                       temp3 
    103         Reading 3                       temp1  not in vt1211 
     102        Reading 1                       temp3   Intel thermal diode 
     103        Reading 3                       temp1   VT1211 internal thermal diode 
    104104        UCH1/Reading2   in0             temp2 
    105105        UCH2            in1             temp4 
     
    250250#define VT1211_SYSCTL_FAN1 1101 
    251251#define VT1211_SYSCTL_FAN2 1102 
    252 #define VT1211_SYSCTL_TEMP 1200 
     252#define VT1211_SYSCTL_TEMP1 1200 
    253253#define VT1211_SYSCTL_TEMP2 1201 
    254254#define VT1211_SYSCTL_TEMP3 1202 
     
    269269#define VT1211_ALARM_IN5 0x04 
    270270#define VT1211_ALARM_IN3 0x08 
    271 #define VT1211_ALARM_TEMP 0x10 
     271#define VT1211_ALARM_TEMP1 0x10 
    272272#define VT1211_ALARM_FAN1 0x40 
    273273#define VT1211_ALARM_FAN2 0x80 
     
    278278#define VT1211_ALARM_TEMP3 0x8000 
    279279/* duplicates */ 
    280 #define VT1211_ALARM_IN0 VT1211_ALARM_TEMP 
     280#define VT1211_ALARM_IN0 VT1211_ALARM_TEMP2 
    281281#define VT1211_ALARM_TEMP4 VT1211_ALARM_IN1 
    282282#define VT1211_ALARM_TEMP5 VT1211_ALARM_IN2 
     
    303303        {VT1211_SYSCTL_IN6, "in6", NULL, 0, 0644, NULL, &i2c_proc_real, 
    304304         &i2c_sysctl_real, NULL, &vt1211_in}, 
    305         {VT1211_SYSCTL_TEMP, "temp1", NULL, 0, 0644, NULL, &i2c_proc_real, 
    306          &i2c_sysctl_real, NULL, &vt1211_temp}, 
    307305*/ 
     306        {VT1211_SYSCTL_TEMP1, "temp1", NULL, 0, 0644, NULL, 
     307         &i2c_proc_real, &i2c_sysctl_real, NULL, &vt1211_temp}, 
    308308        {VT1211_SYSCTL_TEMP2, "temp2", NULL, 0, 0644, NULL, 
    309309         &i2c_proc_real, &i2c_sysctl_real, NULL, &vt1211_temp}, 
     
    514514                                                     VT1211_REG_FAN_MIN(i)); 
    515515                } 
    516                 for (i = 2; i <= 7; i++) { 
     516                for (i = 1; i <= 7; i++) { 
    517517                        if(ISTEMP(i, data->uch_config)) { 
    518518                                data->temp[i - 1] = vt_rdval(client, 
     
    639639{ 
    640640        struct vt1211_data *data = client->data; 
    641         int nr = ctl_name - VT1211_SYSCTL_TEMP
     641        int nr = ctl_name - VT1211_SYSCTL_TEMP1
    642642 
    643643        if (operation == SENSORS_PROC_REAL_INFO) 
  • lm-sensors/trunk/lib/chips.c

    r3226 r3246  
    45374537                             SENSORS_VT1211_FAN2, 
    45384538                             RW, VT1211_SYSCTL_FAN2, VALUE(1), 0 }, 
    4539     /* no temp1 */ 
     4539    { SENSORS_VT1211_TEMP1, "temp1", NOMAP, NOMAP, 
     4540                         R, VT1211_SYSCTL_TEMP1, VALUE(3), 1 }, 
     4541    { SENSORS_VT1211_TEMP1_HYST, "temp1_hyst", SENSORS_VT1211_TEMP1, 
     4542                              SENSORS_VT1211_TEMP1, RW, 
     4543                              VT1211_SYSCTL_TEMP1, VALUE(2), 1 }, 
     4544    { SENSORS_VT1211_TEMP1_OVER, "temp1_over", SENSORS_VT1211_TEMP1, 
     4545                              SENSORS_VT1211_TEMP1, RW, 
     4546                              VT1211_SYSCTL_TEMP1, VALUE(1), 1 }, 
    45404547    { SENSORS_VT1211_TEMP2, "temp2", NOMAP, NOMAP, 
    45414548                         R, VT1211_SYSCTL_TEMP2, VALUE(3), 1 }, 
  • lm-sensors/trunk/lib/chips.h

    r3226 r3246  
    17101710#define SENSORS_VT1211_FAN1_MIN 41 /* RW */ 
    17111711#define SENSORS_VT1211_FAN2_MIN 42 /* RW */ 
    1712 #define SENSORS_VT1211_TEMP 51 /* R */ 
    1713 #define SENSORS_VT1211_TEMP_HYST 52 /* RW */ 
    1714 #define SENSORS_VT1211_TEMP_OVER 53 /* RW */ 
     1712#define SENSORS_VT1211_TEMP1 51 /* R */ 
     1713#define SENSORS_VT1211_TEMP1_HYST 52 /* RW */ 
     1714#define SENSORS_VT1211_TEMP1_OVER 53 /* RW */ 
    17151715#define SENSORS_VT1211_TEMP2 54 /* R */ 
    17161716#define SENSORS_VT1211_TEMP2_HYST 55 /* RW */ 
  • lm-sensors/trunk/prog/sensors/chips.c

    r3226 r3246  
    43124312  } 
    43134313  free(label); 
    4314  
    4315   /* no temp 1 */ 
     4314  if (sensors_get_label_and_valid(*name,SENSORS_VT1211_TEMP1,&label,&valid)) { 
     4315    printf("ERROR: Can't get TEMP1 config!\n"); 
     4316  } else if (valid) { 
     4317    if(!(err = sensors_get_feature(*name,SENSORS_VT1211_TEMP1,&cur)) && 
     4318       !(err = sensors_get_feature(*name,SENSORS_VT1211_TEMP1_HYST,&min)) && 
     4319       !(err = sensors_get_feature(*name,SENSORS_VT1211_TEMP1_OVER,&max))) { 
     4320      print_label(label,10); 
     4321      print_temp_info( cur, max, min, HYST, 1, 0); 
     4322      printf(" %s\n", alarms & VT1211_ALARM_TEMP1 ? "ALARM" : "" ); 
     4323    } else 
     4324      printf("ERROR: Can't get TEMP1 data!\n"); 
     4325  } 
     4326  free(label); 
    43164327  if (sensors_get_label_and_valid(*name,SENSORS_VT1211_TEMP2,&label,&valid)) { 
    43174328    printf("ERROR: Can't get TEMP2 config!\n");