Changeset 4083

Show
Ignore:
Timestamp:
08/03/06 22:28:20 (8 years ago)
Author:
khali
Message:

Add support for the IT8716F (prefix it8716). It is mostly similar to the
IT8712F so there's not much to do. The most significant difference is that
fan speeds are now reported as 16-bit values, without fan clock dividers.
For this reason, I made the fan_divs optional in sensors. I also made the
fans themselves optional, as I noticed that a number of motherboards don't
use (and don't enable) fan3.

I've made a separate section (chip "it8716-*") in sensors.conf.eg, because
new motherboards tend to have different wirings (e.g. negative voltage
lines are not monitored) so this will make for saner defaults.

Thanks to Stian Oksavik for testing.

Location:
lm-sensors/trunk
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r4077 r4083  
    66  File etc/sensors.conf.eg: Add an smsc47m192 section 
    77                            Comment out all set statements 
     8                            Add an it8716 section 
    89  Library: Fix device scan when no i2c support is present 
    910           Add support for W83627EHF voltage inputs and alarms 
     
    1112           Fix all memory leaks (yeah!) 
    1213           Fix no sensors being reported as an error 
     14           Add support for the IT8716F chip 
    1315  Makefile: Don't grep autoconf.h on user-space targets 
    1416            Fix depmod on non-running kernel version 
     
    4446                   Add abituguru support (Hans de Goede) 
    4547                   Fix memory leak when printing an unknown chip 
     48                   Add it8716 support 
     49                   Make each it87 fan and fan div optional 
    4650  Program sensors-detect: Add ServerWorks HT-1000 SMBus detection 
    4751                          Add ATI IXP200/300/400 SMBus detection 
  • lm-sensors/trunk/etc/sensors.conf.eg

    r4074 r4083  
    16791679 
    16801680 
     1681chip "it8716-*" 
     1682 
     1683# Voltages 
     1684 
     1685    label  in0  "VCore" 
     1686    label  in2  "+3.3V" 
     1687    label  in3  "+5V" 
     1688    label  in4  "+12V" 
     1689    label  in7  "5VSB" 
     1690    label  in8  "VBat" 
     1691 
     1692    compute in3  ((6.8/10)+1)*@ , @/((6.8/10)+1) 
     1693    compute in4  ((30/10)+1)*@  , @/((30/10)+1) 
     1694    compute in7  ((6.8/10)+1)*@ , @/((6.8/10)+1) 
     1695 
     1696# If vid (nominal CPU voltage) isn't correct, hardcode the correct value 
     1697# instead. 
     1698#    set in0_min  vid * 0.95 
     1699#    set in0_max  vid * 1.05 
     1700#    set in2_min  3.3 * 0.95 
     1701#    set in2_max  3.3 * 1.05 
     1702#    set in3_min    5 * 0.95 
     1703#    set in3_max    5 * 1.05 
     1704#    set in4_min   12 * 0.95 
     1705#    set in4_max   12 * 1.05 
     1706#    set in7_min    5 * 0.95 
     1707#    set in7_max    5 * 1.05 
     1708# The chip does not support in8 min/max 
     1709 
     1710# Temperatures 
     1711 
     1712# If you are lucky, the BIOS has set the proper sensor types for you. 
     1713# If your temperature readings are completely whacky you probably 
     1714# need to change the sensor types. Adujst and uncomment the 
     1715# appropriate lines below. 
     1716# 
     1717# 2 = thermistor; 3 = thermal diode; 0 = unused 
     1718#   set sensor1  3 
     1719#   set sensor2  3 
     1720#   set sensor3  3 
     1721 
     1722# If a given sensor isn't used, you will probably want to ignore it 
     1723# as well (see ignore statement right below). 
     1724# The CPU sensor can be any of temp1, temp2 or temp3 - it's motherboard 
     1725# dependent. Same for the motherboard temperature. 
     1726 
     1727#   label  temp1  "CPU Temp" 
     1728#   label  temp2  "M/B Temp" 
     1729#   ignore temp3 
     1730 
     1731#   set temp1_over  60 
     1732#   set temp1_low   10 
     1733#   set temp2_over  50 
     1734#   set temp2_low   10 
     1735 
     1736# Fans 
     1737 
     1738# The CPU fan can be any of fan1, fan2 or fan3 - it's motherboard 
     1739# dependent. Same for the case fan. 
     1740 
     1741#   label  fan1 "CPU Fan" 
     1742#   label  fan2 "Case Fan" 
     1743#   ignore fan3 
     1744 
     1745#   set fan1_min 2000 
     1746#   set fan2_min 2000 
     1747 
     1748 
    16811749chip "fscpos-*" 
    16821750# Fujitsu-Siemens Poseidon chip 
  • lm-sensors/trunk/lib/chips.c

    r4035 r4083  
    59055905 { SENSORS_IT87_PREFIX, it87_features }, 
    59065906 { SENSORS_IT8712_PREFIX, it87_features }, 
     5907 { SENSORS_IT8716_PREFIX, it87_features }, 
    59075908 { SENSORS_FSCPOS_PREFIX, fscpos_features }, 
    59085909 { SENSORS_FSCSCY_PREFIX, fscscy_features }, 
  • lm-sensors/trunk/lib/chips.h

    r4035 r4083  
    15421542#define SENSORS_IT87_PREFIX "it87" 
    15431543#define SENSORS_IT8712_PREFIX "it8712" 
     1544#define SENSORS_IT8716_PREFIX "it8716" 
    15441545 
    15451546#define SENSORS_IT87_IN0 1 /* R */ 
  • lm-sensors/trunk/prog/detect/sensors-detect

    r4082 r4083  
    14941494     { 
    14951495       name => "ITE IT8716F", 
    1496        driver => "to-be-tested", 
     1496       driver => "it87", 
    14971497       isa_addrs => [0x290], 
    14981498       isa_detect => sub { ite_isa_detect 2, @_ }, 
     
    17401740      { 
    17411741        name => "ITE IT8716F Super IO Sensors", 
    1742         driver => "to-be-tested", 
     1742        driver => "it87", 
    17431743        devid => 0x8716, 
    17441744        logdev => 0x04, 
  • lm-sensors/trunk/prog/sensord/chips.c

    r3173 r4083  
    547547 
    548548static const char *it87_names[] = { 
    549   SENSORS_IT87_PREFIX, SENSORS_IT8712_PREFIX, NULL 
     549  SENSORS_IT87_PREFIX, SENSORS_IT8712_PREFIX, 
     550  SENSORS_IT8716_PREFIX, NULL 
    550551}; 
    551552 
  • lm-sensors/trunk/prog/sensors/chips.c

    r4037 r4083  
    36033603  if (!sensors_get_label_and_valid(*name,SENSORS_IT87_FAN1,&label,&valid) && 
    36043604      !sensors_get_feature(*name,SENSORS_IT87_FAN1,&cur) && 
    3605       !sensors_get_feature(*name,SENSORS_IT87_FAN1_DIV,&fdiv) && 
    36063605      !sensors_get_feature(*name,SENSORS_IT87_FAN1_MIN,&min)) { 
    36073606    if (valid) { 
    36083607      print_label(label,10); 
    3609       printf("%4.0f RPM  (min = %4.0f RPM, div = %1.0f)          %s\n", 
    3610              cur,min,fdiv, alarms&IT87_ALARM_FAN1?"ALARM":""); 
    3611     } 
    3612   } else 
    3613     printf("ERROR: Can't get FAN1 data!\n"); 
     3608      printf("%4.0f RPM  (min = %4.0f RPM", cur, min); 
     3609      /* fan1_div is optional */ 
     3610      if (!sensors_get_feature(*name, SENSORS_IT87_FAN1_DIV, &fdiv)) 
     3611        printf(", div = %1.0f)", fdiv); 
     3612      else 
     3613        printf(")         "); 
     3614      printf("          %s\n", alarms&IT87_ALARM_FAN1?"ALARM":""); 
     3615    } 
     3616  } 
    36143617  free(label); 
    36153618  if (!sensors_get_label_and_valid(*name,SENSORS_IT87_FAN2,&label,&valid) && 
    36163619      !sensors_get_feature(*name,SENSORS_IT87_FAN2,&cur) && 
    3617       !sensors_get_feature(*name,SENSORS_IT87_FAN2_DIV,&fdiv) && 
    36183620      !sensors_get_feature(*name,SENSORS_IT87_FAN2_MIN,&min)) { 
    36193621    if (valid) { 
    36203622      print_label(label,10); 
    3621       printf("%4.0f RPM  (min = %4.0f RPM, div = %1.0f)          %s\n", 
    3622              cur,min,fdiv, alarms&IT87_ALARM_FAN2?"ALARM":""); 
    3623     } 
    3624   } else 
    3625     printf("ERROR: Can't get FAN2 data!\n"); 
     3623      printf("%4.0f RPM  (min = %4.0f RPM", cur, min); 
     3624      /* fan2_div is optional */ 
     3625      if (!sensors_get_feature(*name, SENSORS_IT87_FAN2_DIV, &fdiv)) 
     3626        printf(", div = %1.0f)", fdiv); 
     3627      else 
     3628        printf(")         "); 
     3629      printf("          %s\n", alarms&IT87_ALARM_FAN2?"ALARM":""); 
     3630    } 
     3631  } 
    36263632  free(label); 
    36273633  if (!sensors_get_label_and_valid(*name,SENSORS_IT87_FAN3,&label,&valid) && 
    36283634      !sensors_get_feature(*name,SENSORS_IT87_FAN3,&cur) && 
    3629       !sensors_get_feature(*name,SENSORS_IT87_FAN3_DIV,&fdiv) && 
    36303635      !sensors_get_feature(*name,SENSORS_IT87_FAN3_MIN,&min)) { 
    36313636    if (valid) { 
    36323637      print_label(label,10); 
    3633       printf("%4.0f RPM  (min = %4.0f RPM, div = %1.0f)          %s\n", 
    3634              cur,min,fdiv, alarms&IT87_ALARM_FAN3?"ALARM":""); 
    3635     } 
    3636   } else 
    3637     printf("ERROR: Can't get FAN3 data!\n"); 
     3638      printf("%4.0f RPM  (min = %4.0f RPM", cur, min); 
     3639      /* fan3_div is optional */ 
     3640      if (!sensors_get_feature(*name, SENSORS_IT87_FAN3_DIV, &fdiv)) 
     3641        printf(", div = %1.0f)", fdiv); 
     3642      else 
     3643        printf(")         "); 
     3644      printf("          %s\n", alarms&IT87_ALARM_FAN3?"ALARM":""); 
     3645    } 
     3646  } 
    36383647  free(label); 
    36393648 
  • lm-sensors/trunk/prog/sensors/main.c

    r4035 r4083  
    382382        { "it87", print_it87 }, 
    383383        { "it8712", print_it87 }, 
     384        { "it8716", print_it87 }, 
    384385        { "ddcmon", print_ddcmon }, 
    385386        { "eeprom", print_eeprom },