Changeset 2257

Show
Ignore:
Timestamp:
02/01/04 14:20:41 (9 years ago)
Author:
khali
Message:

Move FSC Hermes voltage conversions to sensors.conf. (Reinhard

Nissl)

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/etc/sensors.conf.eg

    r2245 r2257  
    15611561 
    15621562# Temperature 
    1563  
    15641563    label temp1       "Temp1/CPU" 
    15651564    label temp2       "Temp2/MB" 
     
    15671566 
    15681567# Fans 
    1569  
    15701568    label fan1        "Fan1/CPU" 
    15711569    label fan2        "Fan2/AUX" 
     
    15731571 
    15741572# Voltage 
    1575  
    15761573    label in0         "+12V" 
    15771574    label in1         "+5V" 
    15781575    label in2         "Battery" 
     1576 
     1577# Compute Voltages using mainboard dependant MRO-values (see doc/chips/fscher) 
     1578#                           M    R             O               O                  M    R 
     1579    compute in0       (@ * (49 * 33) / 255) + (0 / 100), (@ - (0 / 100)) * 255 / (49 * 33) 
     1580    compute in1       (@ * (20 * 33) / 255) + (0 / 100), (@ - (0 / 100)) * 255 / (20 * 33) 
     1581    compute in2       (@ * (10 * 33) / 255) + (0 / 100), (@ - (0 / 100)) * 255 / (10 * 33) 
     1582 
     1583# Allow fans to turn off 
     1584#    set pwm1          0 
     1585#    set pwm2          0 
     1586#    set pwm3          0 
     1587 
     1588# Min cooling 
     1589#    set pwm1          2 
     1590#    set pwm2          1 
     1591#    set pwm3          1 
     1592 
     1593# Max cooling 
     1594#    set pwm1          255 
     1595#    set pwm2          255 
     1596#    set pwm3          255 
    15791597 
    15801598 
  • lm-sensors/trunk/kernel/chips/fscher.c

    r2038 r2257  
    22  fscher.c - Part of lm_sensors, Linux kernel modules for hardware 
    33  monitoring 
    4   Copyright (c) 2003 Reinhard Nissl <rnissl@gmx.de> 
     4  Copyright (C) 2003, 2004 Reinhard Nissl <rnissl@gmx.de> 
    55   
    66  This program is free software; you can redistribute it and/or modify 
     
    2222   fujitsu siemens hermes chip,  
    2323   module based on fscpos.c  
    24    Copyright (c) 2000 Hermann Jung <hej@odn.de> 
    25    Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl> 
     24   Copyright (C) 2000 Hermann Jung <hej@odn.de> 
     25   Copyright (C) 1998, 1999 Frodo Looijaard <frodol@dds.nl> 
    2626   and Philip Edelbrock <phil@netroedge.com> 
    2727*/ 
     
    530530 
    531531/* 
    532  * Multiplier, ReferenceVoltage and Offset were taken from dmidecode output: 
    533  * 
    534  * Handle 0x0002 
    535  *        DMI type 2, 8 bytes. 
    536  *        Board Information Block 
    537  *                Vendor: FUJITSU SIEMENS 
    538  *                Product: D1562 
    539  *                Version: S26361-D1562 
    540  *                Serial Number: 11732921 
    541  * 
    542  * Handle 0x0045 
    543  *        DMI type 185, 56 bytes. 
    544  *        13 
    545  *        ... 
    546  *           01 
    547  *              14 00 
    548  *                    00 00 
    549  *           02 
    550  *              31 00 
    551  *                    00 00  
    552  *           03 
    553  *              0a 00 
    554  *                    00 00 
    555  *        ... 
    556  *           07 
    557  *              21 00 
    558  *        ... 
     532 * The final conversion is specified in sensors.conf, as it depends on 
     533 * mainboard specific values. We export the registers contents as 
     534 * pseudo-hundreds-of-Volts (range 0V - 2.55V). Not that it makes much 
     535 * sense per se, but it minimizes the conversions count and keeps the 
     536 * values within a usual range. 
    559537 */ 
    560  
    561 #define VOLT_FROM_REG(val,mult,ref,off)    (val*mult*ref/255+off) 
    562  
    563538void fscher_volt(struct i2c_client *client, int operation, int ctl_name, 
    564539                 int *nrels_mag, long *results) 
     
    571546    switch(ctl_name) { 
    572547    case FSCHER_SYSCTL_VOLT0: 
    573       results[0] = VOLT_FROM_REG(data->volt[0],0x0031,0x0021,0x0000); 
     548      results[0] = data->volt[0]; 
    574549      break; 
    575550    case FSCHER_SYSCTL_VOLT1: 
    576       results[0] = VOLT_FROM_REG(data->volt[1],0x0014,0x0021,0x0000); 
     551      results[0] = data->volt[1]; 
    577552      break; 
    578553    case FSCHER_SYSCTL_VOLT2: 
    579       results[0] = VOLT_FROM_REG(data->volt[2],0x000a,0x0021,0x0000); 
     554      results[0] = data->volt[2]; 
    580555      break; 
    581556    default: