Changeset 4456
- Timestamp:
- 06/18/07 17:17:43 (6 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 5 modified
-
CHANGES (modified) (2 diffs)
-
kernel/chips/w83627ehf.c (modified) (6 diffs)
-
lib/chips.c (modified) (1 diff)
-
lib/chips.h (modified) (1 diff)
-
prog/sensors/chips.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r4453 r4456 11 11 Add w83627ehf support (for Linux 2.4) 12 12 Add support for the w83627ehf VID function 13 Add support for the w83627ehf thermal sensor types 13 14 Man page sensors.conf.5: Update the chip statement section 14 15 Module i2c-nforce2: Add nForce MCP61, MCP65 support (2.6 backport) … … 37 38 Add w83627ehf support (for Linux 2.4) 38 39 Add support for the w83627ehf VID function 40 Add support for the w83627ehf thermal sensor types 39 41 Program sensors-detect: Stop Super-I/O probe after first family success 40 42 Fix SMSC DME1737 detection -
lm-sensors/trunk/kernel/chips/w83627ehf.c
r4455 r4456 210 210 u8 fan_div[5]; 211 211 u8 has_fan; /* some fan inputs can be disabled */ 212 u8 sensor[3]; 212 213 u16 temp[3]; 213 214 u16 temp_max[3]; … … 243 244 #define W83627EHF_SYSCTL_TEMP2 1202 244 245 #define W83627EHF_SYSCTL_TEMP3 1203 246 #define W83627EHF_SYSCTL_SENSOR1 1211 247 #define W83627EHF_SYSCTL_SENSOR2 1212 248 #define W83627EHF_SYSCTL_SENSOR3 1213 245 249 #define W83627EHF_SYSCTL_VID 1300 /* Volts * 1000 */ 246 250 #define W83627EHF_SYSCTL_VRM 1301 … … 806 810 } 807 811 812 static void w83627ehf_sensor(struct i2c_client *client, int operation, 813 int ctl_name, int *nrels_mag, long *results) 814 { 815 struct w83627ehf_data *data = client->data; 816 int nr = ctl_name - W83627EHF_SYSCTL_SENSOR1; 817 818 if (operation == SENSORS_PROC_REAL_INFO) 819 *nrels_mag = 0; 820 else if (operation == SENSORS_PROC_REAL_READ) { 821 w83627ehf_update_client(client); 822 results[0] = data->sensor[nr]; 823 *nrels_mag = 1; 824 } 825 } 826 808 827 static ctl_table w83627ehf_dir_table_template[] = { 809 828 {W83627EHF_SYSCTL_IN0, "in0", NULL, 0, 0644, NULL, &i2c_proc_real, … … 865 884 {W83627EHF_SYSCTL_VRM, "vrm", NULL, 0, 0644, NULL, &i2c_proc_real, 866 885 &i2c_sysctl_real, NULL, &w83627ehf_vrm}, 886 887 {W83627EHF_SYSCTL_SENSOR1, "sensor1", NULL, 0, 0444, NULL, &i2c_proc_real, 888 &i2c_sysctl_real, NULL, &w83627ehf_sensor}, 889 {W83627EHF_SYSCTL_SENSOR2, "sensor2", NULL, 0, 0444, NULL, &i2c_proc_real, 890 &i2c_sysctl_real, NULL, &w83627ehf_sensor}, 891 {W83627EHF_SYSCTL_SENSOR3, "sensor3", NULL, 0, 0444, NULL, &i2c_proc_real, 892 &i2c_sysctl_real, NULL, &w83627ehf_sensor}, 867 893 {0} 868 894 }; … … 876 902 static void w83627ehf_init_client(struct i2c_client *client) 877 903 { 904 struct w83627ehf_data *data = client->data; 878 905 int i; 879 u8 tmp ;906 u8 tmp, diode; 880 907 881 908 /* Start monitoring if needed */ … … 900 927 printk(KERN_INFO "w83627ehf: Enabling VBAT monitoring\n"); 901 928 w83627ehf_write_value(client, W83627EHF_REG_VBAT, tmp | 0x01); 929 } 930 931 /* Get thermal sensor types */ 932 diode = w83627ehf_read_value(client, W83627EHF_REG_DIODE); 933 for (i = 0; i < 3; i++) { 934 if ((tmp & (0x02 << i))) 935 data->sensor[i] = (diode & (0x10 << i)) ? 1 : 2; 936 else 937 data->sensor[i] = 4; /* thermistor */ 902 938 } 903 939 } -
lm-sensors/trunk/lib/chips.c
r4453 r4456 2148 2148 SENSORS_W83627EHF_TEMP3, RW }, 2149 2149 W83627EHF_SYSCTL_TEMP3, VALUE(2), 1 }, 2150 { { SENSORS_W83627EHF_TEMP1_TYPE, "sensor1", SENSORS_W83627EHF_TEMP1, 2151 NOMAP, R }, 2152 W83627EHF_SYSCTL_SENSOR1, VALUE(1), 0 }, 2153 { { SENSORS_W83627EHF_TEMP2_TYPE, "sensor2", SENSORS_W83627EHF_TEMP2, 2154 NOMAP, R }, 2155 W83627EHF_SYSCTL_SENSOR2, VALUE(1), 0 }, 2156 { { SENSORS_W83627EHF_TEMP3_TYPE, "sensor3", SENSORS_W83627EHF_TEMP3, 2157 NOMAP, R }, 2158 W83627EHF_SYSCTL_SENSOR3, VALUE(1), 0 }, 2150 2159 { { SENSORS_W83627EHF_VID, "vid", NOMAP, NOMAP, R }, 2151 2160 W83627EHF_SYSCTL_VID, VALUE(1), 3 }, -
lm-sensors/trunk/lib/chips.h
r4453 r4456 972 972 #define SENSORS_W83627EHF_TEMP2_HYST 82 /* RW */ 973 973 #define SENSORS_W83627EHF_TEMP3_HYST 83 /* RW */ 974 #define SENSORS_W83627EHF_TEMP1_TYPE 91 /* R */ 975 #define SENSORS_W83627EHF_TEMP2_TYPE 92 /* R */ 976 #define SENSORS_W83627EHF_TEMP3_TYPE 93 /* R */ 974 977 #define SENSORS_W83627EHF_VID 245 /* R */ 975 978 #define SENSORS_W83627EHF_VRM 249 /* R */ -
lm-sensors/trunk/prog/sensors/chips.c
r4453 r4456 2999 2999 print_label(label,10); 3000 3000 print_temp_info(cur, over, hyst, HYST, i ? 1 : 0, i ? 1 : 0); 3001 if (!sensors_get_feature(*name, SENSORS_W83627EHF_TEMP1_TYPE+i, &cur)) { 3002 int sensor = cur + 0.5; 3003 printf("[%-10s]", sensor == 1 ? "CPU diode" : 3004 sensor == 2 ? "transistor" : "thermistor"); 3005 } 3001 3006 if (sensors_get_feature(*name, SENSORS_W83627EHF_TEMP1_ALARM+i, &alarm)) 3002 3007 alarm = temp_alarms & (1 << i);
