Changeset 4952

Show
Ignore:
Timestamp:
10/14/07 14:00:15 (7 years ago)
Author:
jwrdegoede
Message:

Several fixes to the fschmd support

Location:
lm-sensors/trunk
Files:
3 modified

Legend:

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

    r4942 r4952  
    63436343                NOSYSCTL, VALUE(1), 0 }, \ 
    63446344        { { SENSORS_FSCHMD_FAN_DIV(nr), "fan" #nr "_div", \ 
    6345                 SENSORS_FSCHMD_FAN(nr), NOMAP, R }, \ 
     6345                SENSORS_FSCHMD_FAN(nr), NOMAP, RW }, \ 
    63466346                NOSYSCTL, VALUE(nr), 0 }, \ 
    63476347        { { SENSORS_FSCHMD_FAN_ALARM(nr), "fan" #nr "_alarm", \ 
  • lm-sensors/trunk/lib/proc.c

    r4939 r4952  
    456456/* give up, use old name (probably won't work though...) */ 
    457457/* known to be the same: 
    458         "alarms", "beep_enable", "vrm", "fan%d_div" (except old fscxxx drivers 
    459         which use fan%d_ripple, fixed using altsysname for new drv. GRR) 
     458        "alarms", "beep_enable", "vrm", "fan%d_div" 
    460459*/ 
    461460        strcpy(sysname, name); 
  • lm-sensors/trunk/prog/sensors/chips.c

    r4949 r4952  
    63556355               alarm ? "ALARM" : ""); 
    63566356    } 
    6357   }  
    6358   /* no error on failure as we get used for various FSC chips and not all 
    6359      have the same amount of fan sensors */ 
    6360    
     6357  } else { 
     6358    printf("ERROR: Can't get fan%d data!\n", i); 
     6359  } 
    63616360  free(label); 
    63626361} 
     
    63886387      } 
    63896388    } 
    6390   } 
    6391   /* no error on failure as we get used for various FSC chips and not all 
    6392      have the same amount of temp sensors */ 
    6393  
     6389  } else { 
     6390    printf("ERROR: Can't get temp%d data!\n", i); 
     6391  } 
    63946392  free(label); 
    63956393} 
     
    63986396{ 
    63996397  int i; 
     6398  int no_fan_sensors, no_temp_sensors; 
     6399 
     6400  if (!strcmp(name->prefix,"fschmd")) { 
     6401    no_fan_sensors = 5; 
     6402    no_temp_sensors = 5; 
     6403  } else { /* fschrc */ 
     6404    no_fan_sensors = 4; 
     6405    no_temp_sensors = 3; 
     6406  } 
    64006407   
    64016408  for (i = 0; i <= 2; i++) 
    64026409    print_fschmd_in(name, i, SENSORS_FSCHMD_IN(i)); 
    64036410 
    6404   for (i = 1; i <= 6; i++) 
     6411  for (i = 1; i <= no_fan_sensors; i++) 
    64056412    print_fschmd_fan(name, i, SENSORS_FSCHMD_FAN(i), 
    64066413                     SENSORS_FSCHMD_FAN_DIV(i)); 
    64076414 
    6408   for (i = 1; i <= 5; i++) 
     6415  for (i = 1; i <= no_temp_sensors; i++) 
    64096416    print_fschmd_temp(name, i, SENSORS_FSCHMD_TEMP(i), 
    64106417                      SENSORS_FSCHMD_TEMP_MAX(i));