Changeset 2017
- Timestamp:
- 10/13/03 05:01:45 (10 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 3 modified
-
CHANGES (modified) (1 diff)
-
kernel/chips/bmcsensors.c (modified) (14 diffs)
-
lib/chips.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r2014 r2017 18 18 ----------------------------------------------------------------------------- 19 19 2.8.2 (???) 20 Library: Fix bmcsensors scaling, increase number of sensors 20 21 Module i2c-sis630: sync with 2.6.0-X driver version. 22 Module bmcsensors: Fix voltage scaling, voltage and fan limits 21 23 22 24 -
lm-sensors/trunk/kernel/chips/bmcsensors.c
r1779 r2017 64 64 65 65 static void bmcsensors_update_client(struct i2c_client *client); 66 static int bmcsensors_find(int *address);67 66 static void bmcsensors_reserve_sdr(void); 68 67 … … 70 69 static void bmcsensors_all(struct i2c_client *client, int operation, 71 70 int ctl_name, int *nrels_mag, long *results); 71 #if 0 72 72 static void bmcsensors_alarms(struct i2c_client *client, int operation, 73 73 int ctl_name, int *nrels_mag, long *results); … … 76 76 static void bmcsensors_pwm(struct i2c_client *client, int operation, 77 77 int ctl_name, int *nrels_mag, long *results); 78 #endif 78 79 static void bmcsensors_get_sdr(u16 resid, u16 record, u8 offset); 79 80 static void bmcsensors_get_reading(struct i2c_client *client, int i); 80 81 static int bmcsensors_id = 0;82 81 83 82 static struct i2c_driver bmcsensors_driver = { … … 103 102 }; 104 103 105 static bmcsensors_initialized;104 static int bmcsensors_initialized; 106 105 107 106 #define MAX_SDR_ENTRIES 50 … … 124 123 u8 nominal; 125 124 u8 limits[SDR_LIMITS]; 126 int lim1, lim2; 125 int lim1, lim2; /* index into limits for reported upper and lower limit */ 127 126 u8 lim1_write, lim2_write; 128 127 u8 string_type; … … 239 238 /* select two out of the 8 possible readable thresholds, and place indexes into the limits 240 239 array into lim1 and lim2. Set writable flags */ 241 static void bmcsensors_select_thresholds( int i)242 { 243 u8 capab = sd rd[i].capab;244 u16 mask = sd rd[i].thresh_mask;245 246 sd rd[i].lim1 = -1;247 sd rd[i].lim2 = -1;248 sd rd[i].lim1_write = 0;249 sd rd[i].lim2_write = 0;240 static void bmcsensors_select_thresholds(struct sdrdata * sd) 241 { 242 u8 capab = sd->capab; 243 u16 mask = sd->thresh_mask; 244 245 sd->lim1 = -1; 246 sd->lim2 = -1; 247 sd->lim1_write = 0; 248 sd->lim2_write = 0; 250 249 251 250 if(((capab & 0x0c) == 0x04) || /* readable thresholds ? */ … … 253 252 /* select upper threshold */ 254 253 if(mask & 0x10) { /* upper crit */ 255 sd rd[i].lim1 = 1;254 sd->lim1 = 1; 256 255 if((capab & 0x0c) == 0x08 && (mask & 0x1000)) 257 sd rd[i].lim1_write = 1;256 sd->lim1_write = 1; 258 257 } 259 258 else if(mask & 0x20) { /* upper non-recov */ 260 sd rd[i].lim1 = 0;259 sd->lim1 = 0; 261 260 if((capab & 0x0c) == 0x08 && (mask & 0x2000)) 262 sd rd[i].lim1_write = 1;261 sd->lim1_write = 1; 263 262 } 264 263 else if(mask & 0x08) { /* upper non-crit */ 265 sd rd[i].lim1 = 2;264 sd->lim1 = 2; 266 265 if((capab & 0x0c) == 0x08 && (mask & 0x0800)) 267 sd rd[i].lim1_write = 1;266 sd->lim1_write = 1; 268 267 } 269 268 270 269 /* select lower threshold */ 271 if(((capab & 0x30) == 0x10) || /* readable hysteresis ? */ 272 ((capab & 0x30) == 0x20)) /* pos hyst */ 273 sdrd[i].lim2 = 6; 270 if((((capab & 0x30) == 0x10) || /* readable ? */ 271 ((capab & 0x30) == 0x20)) && /* pos hyst */ 272 sd->stype == STYPE_TEMP) 273 sd->lim2 = 6; 274 274 else if(mask & 0x02) { /* lower crit */ 275 sd rd[i].lim2 = 4;275 sd->lim2 = 4; 276 276 if((capab & 0x0c) == 0x08 && (mask & 0x0200)) 277 sd rd[i].lim2_write = 1;277 sd->lim2_write = 1; 278 278 } 279 279 else if(mask & 0x04) { /* lower non-recov */ 280 sd rd[i].lim2 = 3;280 sd->lim2 = 3; 281 281 if((capab & 0x0c) == 0x08 && (mask & 0x0400)) 282 sd rd[i].lim2_write = 1;282 sd->lim2_write = 1; 283 283 } 284 284 else if(mask & 0x01) { /* lower non-crit */ 285 sd rd[i].lim2 = 5;285 sd->lim2 = 5; 286 286 if((capab & 0x0c) == 0x08 && (mask & 0x0100)) 287 sdrd[i].lim2_write = 1; 288 } 289 } 290 291 if(sdrd[i].lim1 >= 0) 292 printk(KERN_INFO "bmcsensors.o: sensor %d: using %s for upper limit\n", 293 i, threshold_text[sdrd[i].lim1]); 287 sd->lim2_write = 1; 288 } 289 } 290 291 /* fixme swap lim1/lim2 if m < 0 */ 292 if(sd->lim1 >= 0) 293 printk(KERN_INFO "bmcsensors.o: using %s for upper limit\n", 294 threshold_text[sd->lim1]); 294 295 #ifdef DEBUG 295 296 else 296 printk(KERN_INFO "bmcsensors.o: sensor %d: no readable upper limit\n", i);297 #endif 298 if(sd rd[i].lim2 >= 0)299 printk(KERN_INFO "bmcsensors.o: sensor %d:using %s for lower limit\n",300 i, threshold_text[sdrd[i].lim2]);297 printk(KERN_INFO "bmcsensors.o: no readable upper limit\n"); 298 #endif 299 if(sd->lim2 >= 0) 300 printk(KERN_INFO "bmcsensors.o: using %s for lower limit\n", 301 threshold_text[sd->lim2]); 301 302 #ifdef DEBUG 302 303 else 303 printk(KERN_INFO "bmcsensors.o: sensor %d: no readable lower limit\n", i);304 printk(KERN_INFO "bmcsensors.o: no readable lower limit\n"); 304 305 #endif 305 306 } … … 369 370 bmcsensors_dir_table[i].procname, id); 370 371 } 371 bmcsensors_select_thresholds( i);372 bmcsensors_select_thresholds(sdrd + i); 372 373 if(sdrd[i].linear != 0) { 373 374 printk(KERN_INFO … … 441 442 { 442 443 u16 record; 443 int type , length, owner, lun, number, entity, instance, init;444 int stype , code;444 int type; 445 int stype; 445 446 int id_length; 446 447 int i; 447 448 int rstate = STATE_SDR; 448 struct ipmi_msg txmsg;449 449 unsigned char * data; 450 450 u8 id[SDR_MAX_UNPACKED_ID_LENGTH]; … … 849 849 850 850 /* need better way to map from sysctl to sdrd record number */ 851 static intfind_sdrd(int sysctl)851 static struct sdrdata * find_sdrd(int sysctl) 852 852 { 853 853 int i; … … 855 855 for(i = 0; i < sdrd_count; i++) 856 856 if(sdrd[i].sysctl == sysctl) 857 return i;858 return -1;857 return sdrd + i; 858 return NULL; 859 859 } 860 860 … … 862 862 static const int exps[] = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000}; 863 863 864 static int decplaces(int i) 865 { 866 u8 k2; 867 868 k2 = sdrd[i].k >> 4; 869 if(k2 < 8) 864 /* Return 0 for fan, 2 for temp, 3 for voltage 865 We could make it variable based on the accuracy (= log10(m * 10**k2)); 866 this would work for /proc output, however libsensors resolution 867 is statically set in lib/chips.c */ 868 static int decplaces(struct sdrdata *sd) 869 { 870 switch(sd->stype) { 871 case STYPE_TEMP: 872 return 2; 873 case STYPE_CURR: 874 case STYPE_VOLT: 875 return 3; 876 case STYPE_FAN: 877 default: 870 878 return 0; 871 else872 return 16 - k2; 873 } 874 875 static long conv ert_value(u8 value, int i)879 } 880 } 881 882 /* convert a raw value to a reading. IMPI V1.5 Section 30 */ 883 static long conv_val(int value, struct sdrdata *sd) 876 884 { 877 885 u8 k1, k2; 878 886 long r; 879 887 880 /* fixme signed/unsigned */ 881 r = value * sdrd[i].m; 882 883 k1 = sdrd[i].k & 0x0f; 884 k2 = sdrd[i].k >> 4; 888 r = value * sd->m; 889 k1 = sd->k & 0x0f; 890 k2 = sd->k >> 4; 885 891 if(k1 < 8) 886 r += sd rd[i].b * exps[k1];892 r += sd->b * exps[k1]; 887 893 else 888 r += sdrd[i].b / exps[16 - k1]; 894 r += sd->b / exps[16 - k1]; 895 r *= exps[decplaces(sd)]; 889 896 if(k2 < 8) 890 897 r *= exps[k2]; 891 /*892 taken care of by nrels_mag893 898 else 894 899 r /= exps[16 - k2]; 895 */896 900 return r; 897 901 } … … 903 907 int *nrels_mag, long *results) 904 908 { 905 int i; 909 struct sdrdata *sd; 910 /* 906 911 struct bmcsensors_data *data = client->data; 907 908 if((i = find_sdrd(ctl_name)) < 0) { 912 */ 913 914 if((sd = find_sdrd(ctl_name)) == NULL) { 909 915 *nrels_mag = 0; 910 916 return; 911 917 } 912 918 if (operation == SENSORS_PROC_REAL_INFO) 913 *nrels_mag = decplaces( i);919 *nrels_mag = decplaces(sd); 914 920 else if (operation == SENSORS_PROC_REAL_READ) { 915 921 bmcsensors_update_client(client); 916 if(sdrd[i].stype == STYPE_FAN) { /* lower limit only */ 917 if(sdrd[i].lim2 >= 0) 918 results[0] = convert_value(sdrd[i].limits[sdrd[i].lim2], i); 919 else 920 results[0] = 0; 921 results[1] = convert_value(sdrd[i].reading, i); 922 if(sd->lim2 >= 0) { 923 if(sd->stype == STYPE_TEMP) /* upper limit first */ 924 results[0] = 925 conv_val(sd->limits[sd->lim1], sd); 926 else /* lower limit first */ 927 results[0] = 928 conv_val(sd->limits[sd->lim2], sd); 929 } else 930 results[0] = 0; 931 if(sd->stype == STYPE_FAN) { /* lower limit only */ 932 results[1] = conv_val(sd->reading, sd); 922 933 *nrels_mag = 2; 923 934 } else { 924 if(sdrd[i].lim1 >= 0) 925 results[0] = convert_value(sdrd[i].limits[sdrd[i].lim1], i); 926 else 927 results[0] = 0; 928 results[2] = convert_value(sdrd[i].reading, i); 929 if(sdrd[i].lim2 >= 0) { 930 results[1] = convert_value(sdrd[i].limits[sdrd[i].lim2], i); 931 if(sdrd[i].lim2 == 6) /* pos. threshold */ 932 results[1] = results[0] - results[1]; 935 if(sd->lim1 >= 0) { 936 if(sd->stype == STYPE_TEMP) { /* lower 2nd */ 937 results[1] = 938 conv_val(sd->limits[sd->lim2], sd); 939 if(sd->lim2 == 6) /* pos. thresh. */ 940 results[1] = results[0] - 941 results[1]; 942 } else /* upper 2nd */ 943 results[1] = 944 conv_val(sd->limits[sd->lim1], sd); 933 945 } else 934 946 results[1] = 0; 947 results[2] = conv_val(sd->reading, sd); 935 948 *nrels_mag = 3; 936 949 } 937 950 } else if (operation == SENSORS_PROC_REAL_WRITE) { 938 951 if (*nrels_mag >= 1) { 939 } 940 } 941 } 942 952 /* unimplemented */ 953 } 954 } 955 } 956 957 #if 0 943 958 static void bmcsensors_alarms(struct i2c_client *client, int operation, int ctl_name, 944 959 int *nrels_mag, long *results) 945 960 { 946 961 struct bmcsensors_data *data = client->data; 947 #if 0948 962 if (operation == SENSORS_PROC_REAL_INFO) 949 963 *nrels_mag = 0; … … 953 967 *nrels_mag = 1; 954 968 } 955 #endif 956 } 969 } 970 #endif 957 971 958 972 static int __init sm_bmcsensors_init(void) -
lm-sensors/trunk/lib/chips.c
r1987 r2017 4273 4273 { 4274 4274 { SENSORS_BMC_IN1, "in1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4275 SENSORS_MODE_R, BMC_SYSCTL_IN1, VALUE(3), 2},4275 SENSORS_MODE_R, BMC_SYSCTL_IN1, VALUE(3), 3 }, 4276 4276 { SENSORS_BMC_IN1_MIN, "in1_min", SENSORS_BMC_IN1, 4277 4277 SENSORS_BMC_IN1, 4278 SENSORS_MODE_RW, BMC_SYSCTL_IN1, VALUE(1), 2},4278 SENSORS_MODE_RW, BMC_SYSCTL_IN1, VALUE(1), 3 }, 4279 4279 { SENSORS_BMC_IN1_MAX, "in1_max", SENSORS_BMC_IN1, 4280 4280 SENSORS_BMC_IN1, 4281 SENSORS_MODE_RW, BMC_SYSCTL_IN1, VALUE(2), 2},4281 SENSORS_MODE_RW, BMC_SYSCTL_IN1, VALUE(2), 3 }, 4282 4282 { SENSORS_BMC_IN1+1, "in2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4283 SENSORS_MODE_R, BMC_SYSCTL_IN1+1, VALUE(3), 2},4283 SENSORS_MODE_R, BMC_SYSCTL_IN1+1, VALUE(3), 3 }, 4284 4284 { SENSORS_BMC_IN1_MIN+1, "in2_min", SENSORS_BMC_IN1+1, 4285 4285 SENSORS_BMC_IN1+1, 4286 SENSORS_MODE_RW, BMC_SYSCTL_IN1+1, VALUE(1), 2},4286 SENSORS_MODE_RW, BMC_SYSCTL_IN1+1, VALUE(1), 3 }, 4287 4287 { SENSORS_BMC_IN1_MAX+1, "in2_max", SENSORS_BMC_IN1+1, 4288 4288 SENSORS_BMC_IN1+1, 4289 SENSORS_MODE_RW, BMC_SYSCTL_IN1+1, VALUE(2), 2},4289 SENSORS_MODE_RW, BMC_SYSCTL_IN1+1, VALUE(2), 3 }, 4290 4290 { SENSORS_BMC_IN1+2, "in3", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4291 SENSORS_MODE_R, BMC_SYSCTL_IN1+2, VALUE(3), 2},4291 SENSORS_MODE_R, BMC_SYSCTL_IN1+2, VALUE(3), 3 }, 4292 4292 { SENSORS_BMC_IN1_MIN+2, "in3_min", SENSORS_BMC_IN1+2, 4293 4293 SENSORS_BMC_IN1+2, 4294 SENSORS_MODE_RW, BMC_SYSCTL_IN1+2, VALUE(1), 2},4294 SENSORS_MODE_RW, BMC_SYSCTL_IN1+2, VALUE(1), 3 }, 4295 4295 { SENSORS_BMC_IN1_MAX+2, "in3_max", SENSORS_BMC_IN1+2, 4296 4296 SENSORS_BMC_IN1+2, 4297 SENSORS_MODE_RW, BMC_SYSCTL_IN1+2, VALUE(2), 2},4297 SENSORS_MODE_RW, BMC_SYSCTL_IN1+2, VALUE(2), 3 }, 4298 4298 { SENSORS_BMC_IN1+3, "in4", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4299 SENSORS_MODE_R, BMC_SYSCTL_IN1+3, VALUE(3), 2},4299 SENSORS_MODE_R, BMC_SYSCTL_IN1+3, VALUE(3), 3 }, 4300 4300 { SENSORS_BMC_IN1_MIN+3, "in4_min", SENSORS_BMC_IN1+3, 4301 4301 SENSORS_BMC_IN1+3, 4302 SENSORS_MODE_RW, BMC_SYSCTL_IN1+3, VALUE(1), 2},4302 SENSORS_MODE_RW, BMC_SYSCTL_IN1+3, VALUE(1), 3 }, 4303 4303 { SENSORS_BMC_IN1_MAX+3, "in4_max", SENSORS_BMC_IN1+3, 4304 4304 SENSORS_BMC_IN1+3, 4305 SENSORS_MODE_RW, BMC_SYSCTL_IN1+3, VALUE(2), 2},4305 SENSORS_MODE_RW, BMC_SYSCTL_IN1+3, VALUE(2), 3 }, 4306 4306 { SENSORS_BMC_IN1+4, "in5", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4307 SENSORS_MODE_R, BMC_SYSCTL_IN1+4, VALUE(3), 2},4307 SENSORS_MODE_R, BMC_SYSCTL_IN1+4, VALUE(3), 3 }, 4308 4308 { SENSORS_BMC_IN1_MIN+4, "in5_min", SENSORS_BMC_IN1+4, 4309 4309 SENSORS_BMC_IN1+4, 4310 SENSORS_MODE_RW, BMC_SYSCTL_IN1+4, VALUE(1), 2},4310 SENSORS_MODE_RW, BMC_SYSCTL_IN1+4, VALUE(1), 3 }, 4311 4311 { SENSORS_BMC_IN1_MAX+4, "in5_max", SENSORS_BMC_IN1+4, 4312 4312 SENSORS_BMC_IN1+4, 4313 SENSORS_MODE_RW, BMC_SYSCTL_IN1+4, VALUE(2), 2},4313 SENSORS_MODE_RW, BMC_SYSCTL_IN1+4, VALUE(2), 3 }, 4314 4314 { SENSORS_BMC_IN1+5, "in6", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4315 SENSORS_MODE_R, BMC_SYSCTL_IN1+5, VALUE(3), 2},4315 SENSORS_MODE_R, BMC_SYSCTL_IN1+5, VALUE(3), 3 }, 4316 4316 { SENSORS_BMC_IN1_MIN+5, "in6_min", SENSORS_BMC_IN1+5, 4317 4317 SENSORS_BMC_IN1+5, 4318 SENSORS_MODE_RW, BMC_SYSCTL_IN1+5, VALUE(1), 2},4318 SENSORS_MODE_RW, BMC_SYSCTL_IN1+5, VALUE(1), 3 }, 4319 4319 { SENSORS_BMC_IN1_MAX+5, "in6_max", SENSORS_BMC_IN1+5, 4320 4320 SENSORS_BMC_IN1+5, 4321 SENSORS_MODE_RW, BMC_SYSCTL_IN1+5, VALUE(2), 2},4321 SENSORS_MODE_RW, BMC_SYSCTL_IN1+5, VALUE(2), 3 }, 4322 4322 { SENSORS_BMC_IN1+6, "in7", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4323 SENSORS_MODE_R, BMC_SYSCTL_IN1+6, VALUE(3), 2},4323 SENSORS_MODE_R, BMC_SYSCTL_IN1+6, VALUE(3), 3 }, 4324 4324 { SENSORS_BMC_IN1_MIN+6, "in7_min", SENSORS_BMC_IN1+6, 4325 4325 SENSORS_BMC_IN1+6, 4326 SENSORS_MODE_RW, BMC_SYSCTL_IN1+6, VALUE(1), 2},4326 SENSORS_MODE_RW, BMC_SYSCTL_IN1+6, VALUE(1), 3 }, 4327 4327 { SENSORS_BMC_IN1_MAX+6, "in7_max", SENSORS_BMC_IN1+6, 4328 4328 SENSORS_BMC_IN1+6, 4329 SENSORS_MODE_RW, BMC_SYSCTL_IN1+6, VALUE(2), 2 }, 4329 SENSORS_MODE_RW, BMC_SYSCTL_IN1+6, VALUE(2), 3 }, 4330 4331 { SENSORS_BMC_IN1+7, "in8", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4332 SENSORS_MODE_R, BMC_SYSCTL_IN1+7, VALUE(3), 3 }, 4333 { SENSORS_BMC_IN1_MIN+7, "in8_min", SENSORS_BMC_IN1+7, 4334 SENSORS_BMC_IN1+7, 4335 SENSORS_MODE_RW, BMC_SYSCTL_IN1+7, VALUE(1), 3 }, 4336 { SENSORS_BMC_IN1_MAX+7, "in8_max", SENSORS_BMC_IN1+7, 4337 SENSORS_BMC_IN1+7, 4338 SENSORS_MODE_RW, BMC_SYSCTL_IN1+7, VALUE(2), 3 }, 4339 { SENSORS_BMC_IN1+8, "in9", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4340 SENSORS_MODE_R, BMC_SYSCTL_IN1+8, VALUE(3), 3 }, 4341 { SENSORS_BMC_IN1_MIN+8, "in9_min", SENSORS_BMC_IN1+8, 4342 SENSORS_BMC_IN1+8, 4343 SENSORS_MODE_RW, BMC_SYSCTL_IN1+8, VALUE(1), 3 }, 4344 { SENSORS_BMC_IN1_MAX+8, "in9_max", SENSORS_BMC_IN1+8, 4345 SENSORS_BMC_IN1+8, 4346 SENSORS_MODE_RW, BMC_SYSCTL_IN1+8, VALUE(2), 3 }, 4347 { SENSORS_BMC_IN1+9, "in10", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4348 SENSORS_MODE_R, BMC_SYSCTL_IN1+9, VALUE(3), 3 }, 4349 { SENSORS_BMC_IN1_MIN+9, "in10_min", SENSORS_BMC_IN1+9, 4350 SENSORS_BMC_IN1+9, 4351 SENSORS_MODE_RW, BMC_SYSCTL_IN1+9, VALUE(1), 3 }, 4352 { SENSORS_BMC_IN1_MAX+9, "in10_max", SENSORS_BMC_IN1+9, 4353 SENSORS_BMC_IN1+9, 4354 SENSORS_MODE_RW, BMC_SYSCTL_IN1+9, VALUE(2), 3 }, 4355 { SENSORS_BMC_IN1+10, "in11", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4356 SENSORS_MODE_R, BMC_SYSCTL_IN1+10, VALUE(3), 3 }, 4357 { SENSORS_BMC_IN1_MIN+10, "in11_min", SENSORS_BMC_IN1+10, 4358 SENSORS_BMC_IN1+10, 4359 SENSORS_MODE_RW, BMC_SYSCTL_IN1+10, VALUE(1), 3 }, 4360 { SENSORS_BMC_IN1_MAX+10, "in11_max", SENSORS_BMC_IN1+10, 4361 SENSORS_BMC_IN1+10, 4362 SENSORS_MODE_RW, BMC_SYSCTL_IN1+10, VALUE(2), 3 }, 4363 { SENSORS_BMC_IN1+11, "in12", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4364 SENSORS_MODE_R, BMC_SYSCTL_IN1+11, VALUE(3), 3 }, 4365 { SENSORS_BMC_IN1_MIN+11, "in12_min", SENSORS_BMC_IN1+11, 4366 SENSORS_BMC_IN1+11, 4367 SENSORS_MODE_RW, BMC_SYSCTL_IN1+11, VALUE(1), 3 }, 4368 { SENSORS_BMC_IN1_MAX+11, "in12_max", SENSORS_BMC_IN1+11, 4369 SENSORS_BMC_IN1+11, 4370 SENSORS_MODE_RW, BMC_SYSCTL_IN1+11, VALUE(2), 3 }, 4371 { SENSORS_BMC_IN1+12, "in13", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4372 SENSORS_MODE_R, BMC_SYSCTL_IN1+12, VALUE(3), 3 }, 4373 { SENSORS_BMC_IN1_MIN+12, "in13_min", SENSORS_BMC_IN1+12, 4374 SENSORS_BMC_IN1+12, 4375 SENSORS_MODE_RW, BMC_SYSCTL_IN1+12, VALUE(1), 3 }, 4376 { SENSORS_BMC_IN1_MAX+12, "in13_max", SENSORS_BMC_IN1+12, 4377 SENSORS_BMC_IN1+12, 4378 SENSORS_MODE_RW, BMC_SYSCTL_IN1+12, VALUE(2), 3 }, 4379 { SENSORS_BMC_IN1+13, "in14", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4380 SENSORS_MODE_R, BMC_SYSCTL_IN1+13, VALUE(3), 3 }, 4381 { SENSORS_BMC_IN1_MIN+13, "in14_min", SENSORS_BMC_IN1+13, 4382 SENSORS_BMC_IN1+13, 4383 SENSORS_MODE_RW, BMC_SYSCTL_IN1+13, VALUE(1), 3 }, 4384 { SENSORS_BMC_IN1_MAX+13, "in14_max", SENSORS_BMC_IN1+13, 4385 SENSORS_BMC_IN1+13, 4386 SENSORS_MODE_RW, BMC_SYSCTL_IN1+13, VALUE(2), 3 }, 4387 { SENSORS_BMC_IN1+14, "in15", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4388 SENSORS_MODE_R, BMC_SYSCTL_IN1+14, VALUE(3), 3 }, 4389 { SENSORS_BMC_IN1_MIN+14, "in15_min", SENSORS_BMC_IN1+14, 4390 SENSORS_BMC_IN1+14, 4391 SENSORS_MODE_RW, BMC_SYSCTL_IN1+14, VALUE(1), 3 }, 4392 { SENSORS_BMC_IN1_MAX+14, "in15_max", SENSORS_BMC_IN1+14, 4393 SENSORS_BMC_IN1+14, 4394 SENSORS_MODE_RW, BMC_SYSCTL_IN1+14, VALUE(2), 3 }, 4395 { SENSORS_BMC_IN1+15, "in16", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4396 SENSORS_MODE_R, BMC_SYSCTL_IN1+15, VALUE(3), 3 }, 4397 { SENSORS_BMC_IN1_MIN+15, "in16_min", SENSORS_BMC_IN1+15, 4398 SENSORS_BMC_IN1+15, 4399 SENSORS_MODE_RW, BMC_SYSCTL_IN1+15, VALUE(1), 3 }, 4400 { SENSORS_BMC_IN1_MAX+15, "in16_max", SENSORS_BMC_IN1+15, 4401 SENSORS_BMC_IN1+15, 4402 SENSORS_MODE_RW, BMC_SYSCTL_IN1+15, VALUE(2), 3 }, 4403 { SENSORS_BMC_IN1+16, "in17", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4404 SENSORS_MODE_R, BMC_SYSCTL_IN1+16, VALUE(3), 3 }, 4405 { SENSORS_BMC_IN1_MIN+16, "in17_min", SENSORS_BMC_IN1+16, 4406 SENSORS_BMC_IN1+16, 4407 SENSORS_MODE_RW, BMC_SYSCTL_IN1+16, VALUE(1), 3 }, 4408 { SENSORS_BMC_IN1_MAX+16, "in17_max", SENSORS_BMC_IN1+16, 4409 SENSORS_BMC_IN1+16, 4410 SENSORS_MODE_RW, BMC_SYSCTL_IN1+16, VALUE(2), 3 }, 4411 { SENSORS_BMC_IN1+17, "in18", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4412 SENSORS_MODE_R, BMC_SYSCTL_IN1+17, VALUE(3), 3 }, 4413 { SENSORS_BMC_IN1_MIN+17, "in18_min", SENSORS_BMC_IN1+17, 4414 SENSORS_BMC_IN1+17, 4415 SENSORS_MODE_RW, BMC_SYSCTL_IN1+17, VALUE(1), 3 }, 4416 { SENSORS_BMC_IN1_MAX+17, "in18_max", SENSORS_BMC_IN1+17, 4417 SENSORS_BMC_IN1+17, 4418 SENSORS_MODE_RW, BMC_SYSCTL_IN1+17, VALUE(2), 3 }, 4419 { SENSORS_BMC_IN1+18, "in19", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4420 SENSORS_MODE_R, BMC_SYSCTL_IN1+18, VALUE(3), 3 }, 4421 { SENSORS_BMC_IN1_MIN+18, "in19_min", SENSORS_BMC_IN1+18, 4422 SENSORS_BMC_IN1+18, 4423 SENSORS_MODE_RW, BMC_SYSCTL_IN1+18, VALUE(1), 3 }, 4424 { SENSORS_BMC_IN1_MAX+18, "in19_max", SENSORS_BMC_IN1+18, 4425 SENSORS_BMC_IN1+18, 4426 SENSORS_MODE_RW, BMC_SYSCTL_IN1+18, VALUE(2), 3 }, 4427 { SENSORS_BMC_IN1+19, "in20", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4428 SENSORS_MODE_R, BMC_SYSCTL_IN1+19, VALUE(3), 3 }, 4429 { SENSORS_BMC_IN1_MIN+19, "in20_min", SENSORS_BMC_IN1+19, 4430 SENSORS_BMC_IN1+19, 4431 SENSORS_MODE_RW, BMC_SYSCTL_IN1+19, VALUE(1), 3 }, 4432 { SENSORS_BMC_IN1_MAX+19, "in20_max", SENSORS_BMC_IN1+19, 4433 SENSORS_BMC_IN1+19, 4434 SENSORS_MODE_RW, BMC_SYSCTL_IN1+19, VALUE(2), 3 }, 4330 4435 { SENSORS_BMC_FAN1, "fan1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4331 4436 SENSORS_MODE_R, BMC_SYSCTL_FAN1, VALUE(2), 0 }, … … 4342 4447 { SENSORS_BMC_FAN1+6, "fan7", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4343 4448 SENSORS_MODE_R, BMC_SYSCTL_FAN1+6, VALUE(2), 0 }, 4449 { SENSORS_BMC_FAN1+7, "fan8", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4450 SENSORS_MODE_R, BMC_SYSCTL_FAN1+7, VALUE(2), 0 }, 4451 { SENSORS_BMC_FAN1+8, "fan9", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4452 SENSORS_MODE_R, BMC_SYSCTL_FAN1+8, VALUE(2), 0 }, 4453 { SENSORS_BMC_FAN1+9, "fan10", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4454 SENSORS_MODE_R, BMC_SYSCTL_FAN1+9, VALUE(2), 0 }, 4344 4455 { SENSORS_BMC_FAN1_MIN, "fan1_min", SENSORS_BMC_FAN1, 4345 4456 SENSORS_BMC_FAN1, … … 4363 4474 SENSORS_BMC_FAN1+6, 4364 4475 SENSORS_MODE_RW, BMC_SYSCTL_FAN1+6, VALUE(1), 0 }, 4476 { SENSORS_BMC_FAN1_MIN+7, "fan8_min", SENSORS_BMC_FAN1+7, 4477 SENSORS_BMC_FAN1+7, 4478 SENSORS_MODE_RW, BMC_SYSCTL_FAN1+7, VALUE(1), 0 }, 4479 { SENSORS_BMC_FAN1_MIN+8, "fan9_min", SENSORS_BMC_FAN1+8, 4480 SENSORS_BMC_FAN1+8, 4481 SENSORS_MODE_RW, BMC_SYSCTL_FAN1+8, VALUE(1), 0 }, 4482 { SENSORS_BMC_FAN1_MIN+9, "fan10_min", SENSORS_BMC_FAN1+9, 4483 SENSORS_BMC_FAN1+9, 4484 SENSORS_MODE_RW, BMC_SYSCTL_FAN1+9, VALUE(1), 0 }, 4365 4485 { SENSORS_BMC_TEMP1, "temp1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4366 SENSORS_MODE_R, BMC_SYSCTL_TEMP1, VALUE(3), 0},4486 SENSORS_MODE_R, BMC_SYSCTL_TEMP1, VALUE(3), 2 }, 4367 4487 { SENSORS_BMC_TEMP1_MIN, "temp1_min", SENSORS_BMC_TEMP1, 4368 4488 SENSORS_BMC_TEMP1, SENSORS_MODE_RW, 4369 BMC_SYSCTL_TEMP1, VALUE(2), 0},4489 BMC_SYSCTL_TEMP1, VALUE(2), 2 }, 4370 4490 { SENSORS_BMC_TEMP1_MAX, "temp1_max", SENSORS_BMC_TEMP1, 4371 4491 SENSORS_BMC_TEMP1, SENSORS_MODE_RW, 4372 BMC_SYSCTL_TEMP1, VALUE(1), 0},4492 BMC_SYSCTL_TEMP1, VALUE(1), 2 }, 4373 4493 { SENSORS_BMC_TEMP1+1, "temp2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4374 SENSORS_MODE_R, BMC_SYSCTL_TEMP1+1, VALUE(3), 0},4494 SENSORS_MODE_R, BMC_SYSCTL_TEMP1+1, VALUE(3), 2 }, 4375 4495 { SENSORS_BMC_TEMP1_MIN+1, "temp2_min", SENSORS_BMC_TEMP1+1, 4376 4496 SENSORS_BMC_TEMP1+1, SENSORS_MODE_RW, 4377 BMC_SYSCTL_TEMP1+1, VALUE(2), 0},4497 BMC_SYSCTL_TEMP1+1, VALUE(2), 2 }, 4378 4498 { SENSORS_BMC_TEMP1_MAX+1, "temp2_max", SENSORS_BMC_TEMP1+1, 4379 4499 SENSORS_BMC_TEMP1+1, SENSORS_MODE_RW, 4380 BMC_SYSCTL_TEMP1+1, VALUE(1), 0},4500 BMC_SYSCTL_TEMP1+1, VALUE(1), 2 }, 4381 4501 { SENSORS_BMC_TEMP1+2, "temp3", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4382 SENSORS_MODE_R, BMC_SYSCTL_TEMP1+2, VALUE(3), 0},4502 SENSORS_MODE_R, BMC_SYSCTL_TEMP1+2, VALUE(3), 2 }, 4383 4503 { SENSORS_BMC_TEMP1_MIN+2, "temp3_min", SENSORS_BMC_TEMP1+2, 4384 4504 SENSORS_BMC_TEMP1+2, SENSORS_MODE_RW, 4385 BMC_SYSCTL_TEMP1+2, VALUE(2), 0},4505 BMC_SYSCTL_TEMP1+2, VALUE(2), 2 }, 4386 4506 { SENSORS_BMC_TEMP1_MAX+2, "temp3_max", SENSORS_BMC_TEMP1+2, 4387 4507 SENSORS_BMC_TEMP1+2, SENSORS_MODE_RW, 4388 BMC_SYSCTL_TEMP1+2, VALUE(1), 0 }, 4389 /* scalings from here down */ 4508 BMC_SYSCTL_TEMP1+2, VALUE(1), 2 }, 4390 4509 { SENSORS_BMC_TEMP1+3, "temp4", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4391 SENSORS_MODE_R, BMC_SYSCTL_TEMP1+3, VALUE(3), 1},4510 SENSORS_MODE_R, BMC_SYSCTL_TEMP1+3, VALUE(3), 2 }, 4392 4511 { SENSORS_BMC_TEMP1_MIN+3, "temp4_min", SENSORS_BMC_TEMP1+3, 4393 4512 SENSORS_BMC_TEMP1+3, SENSORS_MODE_RW, 4394 BMC_SYSCTL_TEMP1+3, VALUE(2), 1},4513 BMC_SYSCTL_TEMP1+3, VALUE(2), 2 }, 4395 4514 { SENSORS_BMC_TEMP1_MAX+3, "temp4_max", SENSORS_BMC_TEMP1+3, 4396 4515 SENSORS_BMC_TEMP1+3, SENSORS_MODE_RW, 4397 BMC_SYSCTL_TEMP1+3, VALUE(1), 1},4516 BMC_SYSCTL_TEMP1+3, VALUE(1), 2 }, 4398 4517 { SENSORS_BMC_TEMP1+4, "temp5", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4399 SENSORS_MODE_R, BMC_SYSCTL_TEMP1+4, VALUE(3), 1},4518 SENSORS_MODE_R, BMC_SYSCTL_TEMP1+4, VALUE(3), 2 }, 4400 4519 { SENSORS_BMC_TEMP1_MIN+4, "temp5_min", SENSORS_BMC_TEMP1+4, 4401 4520 SENSORS_BMC_TEMP1+4, SENSORS_MODE_RW, 4402 BMC_SYSCTL_TEMP1+4, VALUE(2), 1},4521 BMC_SYSCTL_TEMP1+4, VALUE(2), 2 }, 4403 4522 { SENSORS_BMC_TEMP1_MAX+4, "temp5_max", SENSORS_BMC_TEMP1+4, 4404 4523 SENSORS_BMC_TEMP1+4, SENSORS_MODE_RW, 4405 BMC_SYSCTL_TEMP1+4, VALUE(1), 1},4524 BMC_SYSCTL_TEMP1+4, VALUE(1), 2 }, 4406 4525 { SENSORS_BMC_TEMP1+5, "temp6", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4407 SENSORS_MODE_R, BMC_SYSCTL_TEMP1+5, VALUE(3), 1},4526 SENSORS_MODE_R, BMC_SYSCTL_TEMP1+5, VALUE(3), 2 }, 4408 4527 { SENSORS_BMC_TEMP1_MIN+5, "temp6_min", SENSORS_BMC_TEMP1+5, 4409 4528 SENSORS_BMC_TEMP1+5, SENSORS_MODE_RW, 4410 BMC_SYSCTL_TEMP1+5, VALUE(2), 1},4529 BMC_SYSCTL_TEMP1+5, VALUE(2), 2 }, 4411 4530 { SENSORS_BMC_TEMP1_MAX+5, "temp6_max", SENSORS_BMC_TEMP1+5, 4412 4531 SENSORS_BMC_TEMP1+5, SENSORS_MODE_RW, 4413 BMC_SYSCTL_TEMP1+5, VALUE(1), 1},4532 BMC_SYSCTL_TEMP1+5, VALUE(1), 2 }, 4414 4533 { SENSORS_BMC_TEMP1+6, "temp7", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4415 SENSORS_MODE_R, BMC_SYSCTL_TEMP1+6, VALUE(3), 1},4534 SENSORS_MODE_R, BMC_SYSCTL_TEMP1+6, VALUE(3), 2 }, 4416 4535 { SENSORS_BMC_TEMP1_MIN+6, "temp7_min", SENSORS_BMC_TEMP1+6, 4417 4536 SENSORS_BMC_TEMP1+6, SENSORS_MODE_RW, 4418 BMC_SYSCTL_TEMP1+6, VALUE(2), 1},4537 BMC_SYSCTL_TEMP1+6, VALUE(2), 2 }, 4419 4538 { SENSORS_BMC_TEMP1_MAX+6, "temp7_max", SENSORS_BMC_TEMP1+6, 4420 4539 SENSORS_BMC_TEMP1+6, SENSORS_MODE_RW, 4421 BMC_SYSCTL_TEMP1+6, VALUE(1), 1 }, 4540 BMC_SYSCTL_TEMP1+6, VALUE(1), 2 }, 4541 { SENSORS_BMC_TEMP1+7, "temp8", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4542 SENSORS_MODE_R, BMC_SYSCTL_TEMP1+7, VALUE(3), 2 }, 4543 { SENSORS_BMC_TEMP1_MIN+7, "temp8_min", SENSORS_BMC_TEMP1+7, 4544 SENSORS_BMC_TEMP1+7, SENSORS_MODE_RW, 4545 BMC_SYSCTL_TEMP1+7, VALUE(2), 2 }, 4546 { SENSORS_BMC_TEMP1_MAX+7, "temp8_max", SENSORS_BMC_TEMP1+7, 4547 SENSORS_BMC_TEMP1+7, SENSORS_MODE_RW, 4548 BMC_SYSCTL_TEMP1+7, VALUE(1), 2 }, 4549 { SENSORS_BMC_TEMP1+8, "temp9", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4550 SENSORS_MODE_R, BMC_SYSCTL_TEMP1+8, VALUE(3), 2 }, 4551 { SENSORS_BMC_TEMP1_MIN+8, "temp9_min", SENSORS_BMC_TEMP1+8, 4552 SENSORS_BMC_TEMP1+8, SENSORS_MODE_RW, 4553 BMC_SYSCTL_TEMP1+8, VALUE(2), 2 }, 4554 { SENSORS_BMC_TEMP1_MAX+8, "temp9_max", SENSORS_BMC_TEMP1+8, 4555 SENSORS_BMC_TEMP1+8, SENSORS_MODE_RW, 4556 BMC_SYSCTL_TEMP1+8, VALUE(1), 2 }, 4557 { SENSORS_BMC_TEMP1+9, "temp10", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4558 SENSORS_MODE_R, BMC_SYSCTL_TEMP1+9, VALUE(3), 2 }, 4559 { SENSORS_BMC_TEMP1_MIN+9, "temp10_min", SENSORS_BMC_TEMP1+9, 4560 SENSORS_BMC_TEMP1+9, SENSORS_MODE_RW, 4561 BMC_SYSCTL_TEMP1+9, VALUE(2), 2 }, 4562 { SENSORS_BMC_TEMP1_MAX+9, "temp10_max", SENSORS_BMC_TEMP1+9, 4563 SENSORS_BMC_TEMP1+9, SENSORS_MODE_RW, 4564 BMC_SYSCTL_TEMP1+9, VALUE(1), 2 }, 4422 4565 { SENSORS_BMC_ALARMS, "alarms", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, 4423 4566 SENSORS_MODE_R, BMC_SYSCTL_ALARMS, VALUE(1), 0 },
