Show
Ignore:
Timestamp:
12/31/03 22:30:43 (9 years ago)
Author:
khali
Message:

Add support for the Linux 2.6 version of the lm90 driver.

Files:
1 modified

Legend:

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

    r2196 r2197  
    412412        First looks for a sysfs name and magnitude in the feature structure. 
    413413        These should be added in chips.c for all non-standard feature names. 
    414         If that fails, converts common /proc feature names 
     414        If that fails, converts common /proc feature names 
    415415        to their sysfs equivalent, and uses common sysfs magnitude. 
    416416        Common magnitudes are #defined above. 
     
    425425                temp%d_hyst -> temp_min%d ("") 
    426426                temp%d_max -> temp_max%d 
     427                temp%d_high -> temp_max%d 
    427428                temp%d_min -> temp_min%d 
     429                temp%d_low -> temp_min%d 
    428430                temp%d -> temp_input%d 
     431                tcrit%d -> temp_crit%d 
    429432        AND all conversions listed in the matches[] structure below. 
    430433 
     
    451454                { "beeps", "beep_mask", 0 }, 
    452455                { "pwm", "pwm1", 0 }, 
    453                 { "rempte_temp", "temp_input2", TEMPMAG }, 
     456                { "remote_temp", "temp_input2", TEMPMAG }, 
    454457                { "remote_temp_hyst", "temp_hyst2", TEMPMAG }, 
    455458                { "remote_temp_low", "temp_min2", TEMPMAG }, 
     
    542545                return 0; 
    543546        } 
     547        if(sscanf(name, "temp%d_lo%c%c", &num, &last, &check) == 2 && last == 'w') { 
     548                sprintf(sysname, "temp_min%d", num); 
     549                *sysmag = TEMPMAG; 
     550                return 0; 
     551        } 
    544552        if(sscanf(name, "temp%d_ma%c%c", &num, &last, &check) == 2 && last == 'x') { 
    545553                sprintf(sysname, "temp_max%d", num); 
     554                *sysmag = TEMPMAG; 
     555                return 0; 
     556        } 
     557        if(sscanf(name, "temp%d_hig%c%c", &num, &last, &check) == 2 && last == 'h') { 
     558                sprintf(sysname, "temp_max%d", num); 
     559                *sysmag = TEMPMAG; 
     560                return 0; 
     561        } 
     562        if(sscanf(name, "tcrit%d%c", &num, &check) == 1) { 
     563                sprintf(sysname, "temp_crit%d", num); 
    546564                *sysmag = TEMPMAG; 
    547565                return 0;