Changeset 2729

Show
Ignore:
Timestamp:
10/13/04 22:56:59 (10 years ago)
Author:
khali
Message:

Support the new lm63 driver.

Location:
lm-sensors/trunk/prog/sensors
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/prog/sensors/chips.c

    r2691 r2729  
    46114611} 
    46124612 
     4613void print_lm63(const sensors_chip_name *name) 
     4614{ 
     4615  char *label; 
     4616  double cur, high, low; 
     4617  int valid, alarms; 
     4618 
     4619  if (!sensors_get_feature(*name, SENSORS_LM63_ALARMS, &cur)) 
     4620    alarms = cur + 0.5; 
     4621  else { 
     4622    printf("ERROR: Can't get alarm data!\n"); 
     4623    alarms = 0; 
     4624  } 
     4625 
     4626  if (!sensors_get_label_and_valid(*name, SENSORS_LM63_LOCAL_TEMP, 
     4627      &label, &valid) 
     4628   && !sensors_get_feature(*name, SENSORS_LM63_LOCAL_TEMP, &cur) 
     4629   && !sensors_get_feature(*name, SENSORS_LM63_LOCAL_HIGH, &high)) { 
     4630    if (valid) { 
     4631      print_label(label, 10); 
     4632      print_temp_info(cur, high, 0, MAXONLY, 0, 0); 
     4633      printf(" %s\n", 
     4634        alarms&LM63_ALARM_LOCAL_HIGH?"ALARM":""); 
     4635    } 
     4636  } else 
     4637    printf("ERROR: Can't get local temperature data!\n"); 
     4638  free_the_label(&label); 
     4639 
     4640  if (!sensors_get_label_and_valid(*name, SENSORS_LM63_REMOTE_TEMP, 
     4641      &label, &valid) 
     4642   && !sensors_get_feature(*name, SENSORS_LM63_REMOTE_TEMP, &cur) 
     4643   && !sensors_get_feature(*name, SENSORS_LM63_REMOTE_HIGH, &high) 
     4644   && !sensors_get_feature(*name, SENSORS_LM63_REMOTE_LOW, &low)) { 
     4645    if (valid) { 
     4646      print_label(label, 10); 
     4647      print_temp_info(cur, high, low, MINMAX, 1, 1); 
     4648      printf(" %s\n", 
     4649        alarms&LM63_ALARM_REMOTE_OPEN?"OPEN": 
     4650        alarms&LM63_ALARM_REMOTE_CRIT?"CRITICAL": 
     4651        alarms&(LM63_ALARM_REMOTE_HIGH|LM63_ALARM_REMOTE_LOW)?"ALARM":""); 
     4652    } 
     4653  } else 
     4654    printf("ERROR: Can't get remote temperature data!\n"); 
     4655  free_the_label(&label); 
     4656 
     4657  if (!sensors_get_label_and_valid(*name, SENSORS_LM63_REMOTE_TCRIT, 
     4658      &label, &valid) 
     4659   && !sensors_get_feature(*name, SENSORS_LM63_REMOTE_TCRIT, &high) 
     4660   && !sensors_get_feature(*name, SENSORS_LM63_REMOTE_TCRIT_HYST, &low)) { 
     4661    if (valid) { 
     4662      print_label(label, 10); 
     4663      print_temp_info(high, low, 0, HYSTONLY, 0, 0); 
     4664      printf("\n"); 
     4665    } 
     4666  } else 
     4667    printf("ERROR: Can't get remote tcrit data!\n"); 
     4668  free_the_label(&label); 
     4669 
     4670  if (!sensors_get_label_and_valid(*name, SENSORS_LM63_FAN, 
     4671      &label, &valid) 
     4672   && !sensors_get_feature(*name, SENSORS_LM63_FAN, &cur) 
     4673   && !sensors_get_feature(*name, SENSORS_LM63_FAN_LOW, &low)) { 
     4674    if (valid) { 
     4675      print_label(label, 10); 
     4676      printf("%4.0f RPM  (min = %4.0f RPM) %s\n", cur, low, 
     4677        alarms&LM63_ALARM_FAN_LOW?"ALARM":""); 
     4678    } 
     4679  } else 
     4680    printf("ERROR: Can't get remote tcrit data!\n"); 
     4681  free_the_label(&label); 
     4682} 
    46134683 
    46144684void print_adm1031(const sensors_chip_name *name) 
  • lm-sensors/trunk/prog/sensors/chips.h

    r2684 r2729  
    6161extern void print_lm83(const sensors_chip_name *name); 
    6262extern void print_lm90(const sensors_chip_name *name); 
     63extern void print_lm63(const sensors_chip_name *name); 
    6364extern void print_lm93(const sensors_chip_name *name); 
    6465extern void print_max1619(const sensors_chip_name *name); 
  • lm-sensors/trunk/prog/sensors/main.c

    r2701 r2729  
    431431        { "lm86", print_lm90 }, 
    432432        { "max6657", print_lm90 }, 
     433        { "lm63", print_lm63 }, 
    433434        { "xeontemp", print_xeontemp }, 
    434435        { "max6650", print_max6650 },