2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-09-01 23:05:25 +00:00

lm85 patch from Philip Pokorny <ppokorny@penguincomputing.com>

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1726 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark D. Studebaker
2003-03-17 02:34:10 +00:00
parent 21920eeb66
commit bd256e9552
15 changed files with 3313 additions and 11 deletions

View File

@@ -83,4 +83,5 @@ problems.
* Vojtech Pavlik <vojtech@suse.cz> * Vojtech Pavlik <vojtech@suse.cz>
Author of the i2c-amd8111 bus driver. Author of the i2c-amd8111 bus driver.
Added support for amd8111 SMBus 1.0 controller to i2c-amd756. Added support for amd8111 SMBus 1.0 controller to i2c-amd756.
* Philip Pokorny <ppokorny@penguincomputing.com>
Author of the LM85 chip driver.

7
README
View File

@@ -60,8 +60,9 @@ At least the following I2C/SMBus adapters are supported:
At least the following hardware sensor chips are supported: At least the following hardware sensor chips are supported:
Analog Devices ADM1021, ADM1021A, ADM1022, Analog Devices ADM1021, ADM1021A, ADM1022, ADM1023
ADM1023, ADM1024, ADM1025, and ADM9240 ADM1024, ADM1025, ADM1027 and ADM9240
ADT7463
Asus AS99127F, ASB100 Bach Asus AS99127F, ASB100 Bach
Dallas Semiconductor DS75, DS1621, DS1625, DS1775, and DS1780 Dallas Semiconductor DS75, DS1621, DS1625, DS1775, and DS1780
Hewlett Packard Maxilife (several revisions including '99 NBA) Hewlett Packard Maxilife (several revisions including '99 NBA)
@@ -73,7 +74,7 @@ At least the following hardware sensor chips are supported:
Microchip TC1068, TCM1617, TCN75 Microchip TC1068, TCM1617, TCN75
Myson MTP008 Myson MTP008
National Semiconductor LM75, LM77, LM78, LM78-J, LM79, National Semiconductor LM75, LM77, LM78, LM78-J, LM79,
LM80, LM81, LM84, LM87, and LM92 LM80, LM81, LM84, LM85, LM87, and LM92
Philips NE1617, NE1617A Philips NE1617, NE1617A
SiS 5595, 950 embedded sensors SiS 5595, 950 embedded sensors
SMSC 47M1xx embedded sensors SMSC 47M1xx embedded sensors

View File

@@ -111,6 +111,11 @@ lm78
lm80 lm80
lm80 1 7 2 - yes no lm80 1 7 2 - yes no
lm85
lm85 3 5 4 3 pwm yes no
adm1027 3 5 4 3 pwm yes no
adt7463 3 5 4 3 pwm yes no
lm87 lm87
lm87 2-3 6-8 0-2 1 pwm yes no lm87 2-3 6-8 0-2 1 pwm yes no

515
doc/chips/lm85 Normal file
View File

@@ -0,0 +1,515 @@
Kernel driver `lm85.o'
======================
Status: Complete and somewhat tested
Supported chips:
* National Semiconductors LM85 (B and C versions)
Prefix `lm85'
Addresses scanned: I2C 0x2c, 0x2d, 0x2e
* Analog Devices ADM1027
Prefix `adm1027'
Addresses scanned: I2C 0x2c, 0x2d, 0x2e
* Analog Devices ADT7463
Prefix 'adt7463'
Addresses scanned: I2C 0x2c, 0x2d, 0x2e
Authors:
Philip Pokorny <ppokorny@penguincomputing.com>
Frodo Looijaard <frodol@dds.nl>
Richard Barrington <rich_b_nz@clear.net.nz>
Module Parameters
-----------------
* force: short array (min = 1, max = 48)
List of adapter,address pairs to assume to be present. Autodetection
of the target device will still be attempted. Use one of the more
specific force directives below if this doesn't detect the device.
* force_lm85b: short array (min = 1, max = 48)
List of adapter,address pairs which are unquestionably assumed to contain
a `lm85-B' chip
* force_lm85c: short array (min = 1, max = 48)
List of adapter,address pairs which are unquestionably assumed to contain
a `lm85-C' chip
* force_adm1027: short array (min = 1, max = 48)
List of adapter,address pairs which are unquestionably assumed to contain
a `adm1027' chip
* force_adt7463: short array (min = 1, max = 48)
List of adapter,address pairs which are unquestionably assumed to contain
a `adt7463' chip
* ignore: short array (min = 1, max = 48)
List of adapter,address pairs not to scan
* ignore_range: short array (min = 1, max = 48)
List of adapter,start-addr,end-addr triples not to scan
* probe: short array (min = 1, max = 48)
List of adapter,address pairs to scan additionally
* probe_range: short array (min = 1, max = 48)
List of adapter,start-addr,end-addr triples to scan additionally
Description
-----------
This driver implements support for the National Semiconductors LM85
and compatible chips including the Analog Devices ADM1027 and ADT7463.
The LM85 uses the 2-wire interface compatible with the SMBUS 2.0
specification. Using an analog to digital converter it measures three
(3) temperatures and five (5) voltages. It has four (4) 16-bit
counters for measuring fan speed. Five (5) digital inputs are
provided for sampling the VID signals from the processor to the VRM.
Lastly, there are three (3) PWM outputs that can be used to control
fan speed.
The voltage inputs have internal scaling resistors so that the
following voltage can be measured without external resistors:
2.5V, 3.3V, 5V, 12V, and CPU core voltage (2.25V)
The temperatures measured are one internal diode, and two remote
diodes. Remote 1 is generally the CPU temperature. These inputs are
designed to measure a thermal diode like the one in a Pentium 4
processor in a socket 423 or socket 478 package. They can also
measure temperature using a transistor like the 2N3904.
A sophisticated control system for the PWM outputs is designed into
the LM85 that allows fan speed to be adjusted automatically based on
any of the three temperature sensors. Each PWM output is individually
adjustable and programmable. Once configured, the LM85 will adjust
the PWM outputs in response to the measured temperatures without
further host intervention. This feature can also be disabled for
manual control of the PWM's.
Each of the measured inputs (voltage, temperature, fan speed) has
corresponding high/low limit values. The LM85 will signal an ALARM if
any measured value exceeds either limit.
The LM85 samples all inputs continuously. The lm85 driver will not
read the lm85 more often than once a second. Further, configuration
data is only read once each 5 minutes. There is twice as much config
data as measurements, so this would seem to be a worthwhile
optimization.
Special Features
The LM85 has four fan speed monitoring modes. The ADM1027 has only
two. Both have special circuitry to compensate for PWM interactions
with the TACH signal from the fans. The ADM1027 can be configured to
measure the speed of a two wire fan, but the input conditioning
circuitry is different for 3-wire and 2-wire mode. For this reason,
the 2-wire fan modes are not exposed to user control. The BIOS should
initialize them to the correct mode. If you've designed your own
ADM1027, you'll have to modify the init_client function and add an
insmod parameter to set this up.
To smooth the response of fans to changes in temperature, the LM85 has
an optional filter for smoothing temperatures. The ADM1027 has the
same config option but uses it to rate limit the changes to fan speed
instead. In libsensors, we associate the smoothing feature with a
zone in the LM85 and with a PWM in the ADM1027.
The ADM1027 and ADT7463 have a 10-bit ADC and can therefore measure
temperatures with 0.25 degC resolution. They also provide an offset to
the temperature readings that is automatically applied during
measurement. This offset can be used to zero out any errors due to
traces and placement. The documentation says that the offset is in
0.25 degC steps, but in initial testing of the ADM1027 it was 1.00
degC steps. Analog Devices has confirmed this "bug". The ADT7463 is
reported to work as described in the documentation. Accordingly, the
driver currently reports 1.00 degC steps for the ADM1027 and 0.25 degC
steps for the ADT7463. If you have an ADT7463, please confirm to the
LM85 maintainer that the temperature offset works as implemented.
The ADT7463 has a THERM asserted counter. This counter has a 22.76ms
resolution and a range of 5.8 seconds. The driver implements a 31-bit
accumulator of the counter value to extend the range to over a year.
The counter will stay at it's max value until read. If you want to
insure no counts get lost, you need to trigger the driver to read the
counter every 5 seconds. You can do this by reading just the
therm_signal value. The driver implements reads of 'therm_signal'
without reading the other values for speed. A background shell script
like:
#!/bin/bash
while [ 1 ] ; do
cat /proc/sys/dev/sensors/adt7463-*/therm_signal > /dev/null
sleep 5
done
Or if you want to record the values:
#!/bin/bash
last=0
while [ 1 ] ; do
read tlim total ovfl < /proc/sys/dev/sensors/adt7463-*/therm_signal
if [ $total -gt $last ]; then
echo $(date) - $tlim $total $ovfl
last=$total
fi
sleep 5;
done
Either script should insure no counts are lost.
See the vendor datasheets for more information. There is application
note from National (AN-1260) with some additional information about
the LM85. The Analog Devices datasheet is very detailed and describes
a procedure for determining an optimal configuration for the automatic
PWM control.
Hardware Configurations
-----------------------
The LM85 can be jumpered for 3 different SMBus addresses. There are
no other hardware configuration options for the LM85.
The lm85 driver detects both LM85B and LM85C revisions of the chip.
See the datasheet for a complete description of the differences.
Other than identifying the chip, the driver behaves no differently
with regard to these two chips. The LM85C is recommended for new
designs.
The ADM1027 and ADT7463 chips have an optional SMBALERT output that
can be used to signal the chipset in case a limit is exceeded or the
temperature sensors fail. Individual sensor interrupts can be masked
with 'alarm_mask' so they won't trigger SMBALERT. The SMBALERT output
if configured replaces one of the other functions (PWM2 or IN0). The
driver will print a message if the BIOS has configured this option
when the chip is detected.
The ADT7463 also has an optional THERM output/input which can be
connected to the processor PROC_HOT output. If available, the autofan
control dynamic Tmin feature can be enabled to keep the system
temperature within spec (just?!) with the least possible fan noise.
Configuration Notes
-------------------
The voltage, temperature and fan inputs are available in libsensors
and the sensors executable. In addition, the automatic control of the
PWM outputs can also be configured via sensors.conf. This
configuration is described below:
* Temperatures and Zones
Each temperature sensor is associated with a Zone. There are three
sensors and therefore three zones. Each zone has the following
temperature configuration points:
Limit temp -- Temperature at which the fan will turn on
[ absolute deg C from 0.0 to 127.0 ]
[ sensors.conf: zone#_limit ]
Hysteresis -- Degrees below the limit that fan will remain
on before turning off.
[ relative C from 0.0 to -15.0 ]
[ sensors.conf: zone#_hyst ]
Range -- Degrees above the limit over which the fan
PWM will be adjusted (from PWM_MIN to 100%)
[ relative deg C from 2.0 to 80.0 ]
[ sensors.conf: zone#_range ]
Critical temp -- Temperature above which other fans will be
forced to 100% PWM
[ absolute deg C from 0.0 to 127.0 ]
[ sensors.conf: zone#_critical ]
** Temperature Range for a Zone
The RANGE value for a given zone can have one of 16 different values
in an approximately logrithmic spacing:
Selecting a RANGE not in this list will cause the next larger range to
be used.
Temperature ranges: 2.0, 2.5, 3.3, 4.0, 5.0, 6.6, 8.0, 10.0,
(in deg C) 13.3, 16.0, 20.0, 26.6, 32.0, 40.0, 53.3,
80.0
* Temperature Smoothing or Acoustic Enhancement
The LM85 and ADM1027 use this value in different ways. In the LM85
it's used to filter the temperature input of a zone. In this way, it
affects all PWM's controlled by that zone temperature. In the
ADM1027, it limits the rate of change in fan speed. Thus it is part
of the PWM control algorithm.
Smooth filter -- Optional filter constant to smooth the system
response to temperature spikes. It either
filters the measured temperatures or limits the
rate of change of fan speed. This improves
the system by limiting rapid changes in fan
speed.
[ seconds from 0.8 to 35.0 or 0.0 for OFF ]
[ sensors.conf: zone#_smooth or pwm#_smooth ]
The smoothing can be disabled, or enabled and set to one of the values
listed below. Selecting a filter time constant not on this list will
cause the next smaller value to be used. Setting the time constant to
0 will disable the filtering.
Filter time constant: 35.0, 17.6, 11.8, 7.0, 4.4, 3.0, 1.6, 0.8
(in seconds)
* PWM Control
There are three PWM outputs. The LM85 datasheet suggests that the
PWM3 output control both FAN3 and FAN4. Each PWM can be individually
configured and assigned to a zone for it's control value. Each PWM can be
configured individually according to the following options.
Spinup time -- When turning on a fan that was off, the PWM will
temporarily be set to 100% for this length of
time to insure the fan starts spinning.
[ seconds from 0.0 to 4.0 ]
[ sensors.conf: pwm#_spinup ]
Minimum PWM -- This is the PWM value at the limit temp of the
referenced zone.
[ PWM value from 0.0 to 255.0 ]
[ sensors.conf: pwm#_min ]
Frequency -- This is the base frequency of the PWM output.
[ Hz from 10.0 to 98.0 ]
[ sensors.conf: pwm#_freq ]
Min/Off flag -- This flag determines if the PWM will be off or
"min PWM" below the limit temperature.
[ 0.0 means PWM off (0%) below limit ]
[ sensors.conf: pwm#_min_ctl ]
Invert flag -- This flag causes the PWM output to be inverted.
If inverted, a PWM setting of 0 will be full on
and 100 will be off.
[ 0.0 means PWM is "normal" ]
[ sensors.conf: pwm#_invert ]
** Spinup Time
Spinup time can be one of eight (8) values. Selecting a spinup time
not on this list will result in the next larger spinup time being
selected. Note, the value 0.2 actually results in a setting of 0.250
seconds.
Spinup Time 0.0, 0.1, 0.2, 0.4, 0.7, 1.0, 2.0, 4.0
(in seconds)
** PWM Frequency
The base frequency of the PWM can be controlled. The frequency can be
set to one of the following 8 values. Setting the frequency to a
value not on this list, will result in the next higher frequency being
selected. The actual device frequency may vary slightly from this
specification as designed by the manufacturer. Consult the datasheet
for more details.
PWM Frequency 10.0, 15.0, 23.0, 30.0, 38.0, 47.0, 62.0, 98.0
(in Hz)
** Min/Off Flag
Below the temperature "Limit - Hysteresis" from the controlling zone,
the PWM can turn off (set to 0) or it can stay at the minimum PWM
value. Setting this flag to 1 will cause the PWM value to be the
"Minimum PWM" value below this limit. Setting it to 0 will set the
PWM to 0 (off) below that limit.
NOTE: It has been reported that there is a bug in the LM85 that causes
the Min/Off flag to be associated with the zones not the PWMs. This
contradicts all the published documentation. Setting pwm#_min_ctl in
this case actually affects all PWMs controlled by zone '#'.
** Invert Flag
The PWM output can be inverted. This may be useful if the fan power
circuitry is inverted. (A low output turns on power and a high output
turns off power to the fan). Alternatively, if a slower fan speed is
needed for higher temperatures, this could be set.
Setting this flag to 1 will invert the PWM output. A value of 0
does not invert the PWM output.
* PWM Controlling Zone selection
PWM's can be controlled by zones according to the following
configuration choices:
Value Meaning
------ ------------------------------------------------
1 Controlled by Zone 1
2 Controlled by Zone 2
3 Controlled by Zone 3
23 Controlled by higher temp of Zone 2 or 3
123 Controlled by highest temp of Zone 1, 2 or 3
0 PWM alwasy 0% (off)
-1 PWM always 100% (full on)
-2 Manual control (write to 'pwm#' to set)
These are specified in sensors.conf using 'pwm#_zone'
* /proc Interface
These values can also be set using the /proc interface. The following
files contain the above settings in the order listed below:
Name Values
---------- ----------------------------------------------------
zone# Limit, Hysteresis, Range, Critical
pwm#_cfg Spinup, PWM at low limit, Frequency, Min/Off, Invert
pwm#_zone Control Zone choice
smooth# Filtering
The National LM85's have two vendor specific configuration
features. Tach. mode and Spinup Control. For more details on these,
see the LM85 datasheet or Application Note AN-1260.
Name Values
------------ --------------------------------------------------
tach_mode For best fan speed measurement when PWM's are in use,
the Tach Mode should be set to 2 for all three (Fan's
3 and 4 share a config setting) config values. If
PWM's are not in use or not wired to control fan
speed, mode 0 or 1 may be better.
[ sensors.conf: fan#_tach_mode ]
spinup_ctl Setting spinup_ctl to 1 will modify the fan spinup
algorithm. Instead of setting the PWM to 100% for
the configured period of time, it will be set to 100%
until the measured RPM is greater than the RPM limit
register or the time period elapses.
[ sensors.conf: pwm#_spinup_ctl ]
The Analog Devices ADM1027 has several vendor specific enhancements.
The number of pulses-per-rev of the fans can be set, Tach monitoring
can be optimized for PWM operation, and an offset can be applied to
the temperatures to compensate for systemic errors in the
measurements.
Name Values
------------ --------------------------------------------------
tach_mode For best fan speed measurement when PWM's are in use,
the Tach Mode should be set to 0. If PWM's are not
in use or not wired to control fan speed, a mode of 1
can be selected. This will also increase the rate
of fan speed measurement from 1 per second to 4 per
second.
[ sensors.conf: fan#_tach_mode ]
fan_ppr You can set the pulses per rev to 1, 2, 3 or 4 so
that fan speeds don't have to be scaled.
[ sensors.conf: fan#_ppr ]
temp#_offset This is the value to be added or subtracted from the
measured temperature before reporting it. This also
affects the PWM control algorithms.
[ sensors.conf: temp#_offset ]
In addition to the ADM1027 features, the ADT7463 also has Tmin control
and THERM asserted counts. Automatic Tmin control acts to adjust the
Tmin value to maintain the measured temperature sensor at a specified
temperature. There isn't much documentation on this feature in the
ADT7463 data sheet. The following values control this feature.
(These are not available via sensors.conf)
Enable Flag -- When set to 1, the Tmin control is enabled. When
set to 0, Tmin will remain unchanged.
[ 1 means Tmin control is enabled ]
[ sensors.conf: none ]
Control Loop -- This value sets the cycle time of the control
loop which adjusts the Tmin value. The mapping
from raw value to loop period is non-linear.
[ Raw value from 0 to 7 (4sec) ]
[ sensors.conf: none ]
Set on THERM -- If enabled, this causes the operating point to be
set from the current temperature when THERM is
asserted. If THERM is connected to a PROC_HOT
signal, this can automatically set the operating
point to the highest value that is within spec.
allowing the lowest/quietest fan speed possible.
[ 1 means set op-point on THERM asserted ]
[ sensors.conf: none ]
Target Temp -- This is the target temperature. Tmin will be
adjusted to keep the measured temperature at this
value.
[ degC -127 to 127 degC ]
[ sensors.conf: none ]
The THERM signal monitoring has three parameters:
THERM Limit -- How long THERM can be asserted before an ALARM is
triggered.
[ 22.7 ms counts ]
[ sensors.conf: none ]
THERM Total -- How long THERM has been asserted since the driver
was loaded.
[ 22.7 ms counts ]
[ sensors.conf: none ]
Overflows -- How many times the THERM counter was read with a
max value indicating it overflowed.
[ count ]
[ sensors.conf: none ]
These values are available via /proc under the following names in the
listed order.
Name Values
------------ --------------------------------------------------
tmin_ctl# Enable, Control Period, Set on THREM, Target
therm_signal Limit, Total, Overflows
* Sample sensors.conf Config File
Here is a sample LM85 chip config for sensors.conf
--------- cut here ---------
chip "lm85c-*" "adm1027-*" "adt7463-*" "lm85-*" "lm85b-*"
# Voltage inputs
label in0 "V1.5" # AGP on Intel S845WD1-E
label in1 "VCore"
label in2 "V3.3"
label in3 "V5"
label in4 "V12"
# Temperature inputs
label temp1 "CPU"
label temp2 "Board"
label temp3 "Remote"
# Fan inputs
label fan1 "CPU_Fan"
label fan2 "Fan2"
label fan3 "Fan3"
label fan4 "Fan4"
# PWM Outputs
label pwm1 "CPU_PWM"
label pwm2 "Fan2_PWM"
label pwm3 "Fan3_PWM"
# Voltage scaling is done on-chip. No 'compute' directive
# should be necessary. If in0 has external scaling set
# it here.
# compute in0 @ * 2.5, @ / 2.5
# Adjust fans speeds for actual pulses per rev
compute fan1 @ * 2, @ / 2 # 1 pulse per rev
# set fan1_ppr 1 # ADM1027 or ADT7463
compute fan2 @ / 2, @ * 2 # 4 pulse per rev
# set fan2_ppr 4 # ADM1027 or ADT7463
# Set VRM version
set vrm 9.1 # Pentium 4
# Set voltage limits
set in0_min 1.5 * 0.95
set in0_max 1.5 * 1.05
set in1_min vid * 0.95
set in1_max vid * 1.05
set in2_min 3.3 * 0.95
set in2_max 3.3 * 1.05
set in3_min 5.0 * 0.95
set in4_max 5.0 * 1.05
set in4_min 12 * 0.95
set in3_max 12 * 1.05
# Set Fan limits
set fan1_min 3000
set fan2_min 3000
set fan3_min 3000
set fan4_min 3000

1921
kernel/chips/lm85.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -463,6 +463,73 @@ struct i2c_chips_data {
#define LM87_ALARM_TEMP2_FAULT 0x4000 #define LM87_ALARM_TEMP2_FAULT 0x4000
#define LM87_ALARM_TEMP3_FAULT 0x08000 #define LM87_ALARM_TEMP3_FAULT 0x08000
/* Common parameters */
#define LM85_SYSCTL_IN0 1000
#define LM85_SYSCTL_IN1 1001
#define LM85_SYSCTL_IN2 1002
#define LM85_SYSCTL_IN3 1003
#define LM85_SYSCTL_IN4 1004
#define LM85_SYSCTL_FAN1 1005
#define LM85_SYSCTL_FAN2 1006
#define LM85_SYSCTL_FAN3 1007
#define LM85_SYSCTL_FAN4 1008
#define LM85_SYSCTL_TEMP1 1009
#define LM85_SYSCTL_TEMP2 1010
#define LM85_SYSCTL_TEMP3 1011
#define LM85_SYSCTL_VID 1012
#define LM85_SYSCTL_ALARMS 1013
#define LM85_SYSCTL_PWM1 1014
#define LM85_SYSCTL_PWM2 1015
#define LM85_SYSCTL_PWM3 1016
#define LM85_SYSCTL_VRM 1017
#define LM85_SYSCTL_PWM_CFG1 1019
#define LM85_SYSCTL_PWM_CFG2 1020
#define LM85_SYSCTL_PWM_CFG3 1021
#define LM85_SYSCTL_PWM_ZONE1 1022
#define LM85_SYSCTL_PWM_ZONE2 1023
#define LM85_SYSCTL_PWM_ZONE3 1024
#define LM85_SYSCTL_ZONE1 1025
#define LM85_SYSCTL_ZONE2 1026
#define LM85_SYSCTL_ZONE3 1027
#define LM85_SYSCTL_SMOOTH1 1028
#define LM85_SYSCTL_SMOOTH2 1029
#define LM85_SYSCTL_SMOOTH3 1030
/* Vendor specific values */
#define LM85_SYSCTL_SPINUP_CTL 1100
#define LM85_SYSCTL_TACH_MODE 1101
/* Analog Devices variant of the LM85 */
#define ADM1027_SYSCTL_TACH_MODE 1200
#define ADM1027_SYSCTL_TEMP_OFFSET1 1201
#define ADM1027_SYSCTL_TEMP_OFFSET2 1202
#define ADM1027_SYSCTL_TEMP_OFFSET3 1203
#define ADM1027_SYSCTL_FAN_PPR 1204
#define ADM1027_SYSCTL_ALARM_MASK 1205
/* Analog Devices variant of the LM85/ADM1027 */
#define ADT7463_SYSCTL_TMIN_CTL1 1300
#define ADT7463_SYSCTL_TMIN_CTL2 1301
#define ADT7463_SYSCTL_TMIN_CTL3 1302
#define ADT7463_SYSCTL_THERM_SIGNAL 1303
#define LM85_ALARM_IN0 0x0001
#define LM85_ALARM_IN1 0x0002
#define LM85_ALARM_IN2 0x0004
#define LM85_ALARM_IN3 0x0008
#define LM85_ALARM_TEMP1 0x0010
#define LM85_ALARM_TEMP2 0x0020
#define LM85_ALARM_TEMP3 0x0040
#define LM85_ALARM_ALARM2 0x0080
#define LM85_ALARM_IN4 0x0100
#define LM85_ALARM_RESERVED 0x0200
#define LM85_ALARM_FAN1 0x0400
#define LM85_ALARM_FAN2 0x0800
#define LM85_ALARM_FAN3 0x1000
#define LM85_ALARM_FAN4 0x2000
#define LM85_ALARM_TEMP1_FAULT 0x4000
#define LM85_ALARM_TEMP3_FAULT 0x08000
#define PCF8574_SYSCTL_READ 1000 #define PCF8574_SYSCTL_READ 1000
#define PCF8574_SYSCTL_WRITE 1001 #define PCF8574_SYSCTL_WRITE 1001
@@ -651,7 +718,7 @@ struct i2c_chips_data {
#define VT1211_ALARM_TEMP7 VT1211_ALARM_IN4 #define VT1211_ALARM_TEMP7 VT1211_ALARM_IN4
#define LM92_SYSCTL_ALARMS 2001 /* high, low, critical */ #define LM92_SYSCTL_ALARMS 2001 /* high, low, critical */
#define LM92_SYSCTL_TEMP 1200 /* high, low, critical, hysterisis, input */ #define LM92_SYSCTL_TEMP 1200 /* high, low, critical, hysteresis, input */
#define LM92_ALARM_TEMP_HIGH 0x01 #define LM92_ALARM_TEMP_HIGH 0x01
#define LM92_ALARM_TEMP_LOW 0x02 #define LM92_ALARM_TEMP_LOW 0x02

View File

@@ -2256,6 +2256,436 @@ static sensors_chip_feature eeprom_features[] =
{ 0 } { 0 }
}; };
/* NOTE: Many shared values with adm1027_features !!! */
static sensors_chip_feature lm85_features[] =
{
{ SENSORS_LM85_IN0, "in0", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_IN0, VALUE(3), 3 },
{ SENSORS_LM85_IN1, "in1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_IN1, VALUE(3), 3 },
{ SENSORS_LM85_IN2, "in2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_IN2, VALUE(3), 3 },
{ SENSORS_LM85_IN3, "in3", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_IN3, VALUE(3), 3 },
{ SENSORS_LM85_IN4, "in4", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_IN4, VALUE(3), 3 },
{ SENSORS_LM85_IN0_MIN, "in0_min", SENSORS_LM85_IN0, SENSORS_LM85_IN0,
SENSORS_MODE_RW, LM85_SYSCTL_IN0, VALUE(1), 3 },
{ SENSORS_LM85_IN1_MIN, "in1_min", SENSORS_LM85_IN1, SENSORS_LM85_IN1,
SENSORS_MODE_RW, LM85_SYSCTL_IN1, VALUE(1), 3 },
{ SENSORS_LM85_IN2_MIN, "in2_min", SENSORS_LM85_IN2, SENSORS_LM85_IN2,
SENSORS_MODE_RW, LM85_SYSCTL_IN2, VALUE(1), 3 },
{ SENSORS_LM85_IN3_MIN, "in3_min", SENSORS_LM85_IN3, SENSORS_LM85_IN3,
SENSORS_MODE_RW, LM85_SYSCTL_IN3, VALUE(1), 3 },
{ SENSORS_LM85_IN4_MIN, "in4_min", SENSORS_LM85_IN4, SENSORS_LM85_IN4,
SENSORS_MODE_RW, LM85_SYSCTL_IN4, VALUE(1), 3 },
{ SENSORS_LM85_IN0_MAX, "in0_max", SENSORS_LM85_IN0, SENSORS_LM85_IN0,
SENSORS_MODE_RW, LM85_SYSCTL_IN0, VALUE(2), 3 },
{ SENSORS_LM85_IN1_MAX, "in1_max", SENSORS_LM85_IN1, SENSORS_LM85_IN1,
SENSORS_MODE_RW, LM85_SYSCTL_IN1, VALUE(2), 3 },
{ SENSORS_LM85_IN2_MAX, "in2_max", SENSORS_LM85_IN2, SENSORS_LM85_IN2,
SENSORS_MODE_RW, LM85_SYSCTL_IN2, VALUE(2), 3 },
{ SENSORS_LM85_IN3_MAX, "in3_max", SENSORS_LM85_IN3, SENSORS_LM85_IN3,
SENSORS_MODE_RW, LM85_SYSCTL_IN3, VALUE(2), 3 },
{ SENSORS_LM85_IN4_MAX, "in4_max", SENSORS_LM85_IN4, SENSORS_LM85_IN4,
SENSORS_MODE_RW, LM85_SYSCTL_IN4, VALUE(2), 3 },
{ SENSORS_LM85_FAN1, "fan1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_FAN1, VALUE(2), 0 },
{ SENSORS_LM85_FAN2, "fan2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_FAN2, VALUE(2), 0 },
{ SENSORS_LM85_FAN3, "fan3", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_FAN3, VALUE(2), 0 },
{ SENSORS_LM85_FAN4, "fan4", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_FAN4, VALUE(2), 0 },
{ SENSORS_LM85_FAN1_MIN, "fan1_min", SENSORS_LM85_FAN1, SENSORS_LM85_FAN1,
SENSORS_MODE_RW, LM85_SYSCTL_FAN1, VALUE(1), 0 },
{ SENSORS_LM85_FAN2_MIN, "fan2_min", SENSORS_LM85_FAN2, SENSORS_LM85_FAN2,
SENSORS_MODE_RW, LM85_SYSCTL_FAN2, VALUE(1), 0 },
{ SENSORS_LM85_FAN3_MIN, "fan3_min", SENSORS_LM85_FAN3, SENSORS_LM85_FAN3,
SENSORS_MODE_RW, LM85_SYSCTL_FAN3, VALUE(1), 0 },
{ SENSORS_LM85_FAN4_MIN, "fan4_min", SENSORS_LM85_FAN4, SENSORS_LM85_FAN4,
SENSORS_MODE_RW, LM85_SYSCTL_FAN4, VALUE(1), 0 },
{ SENSORS_LM85_TEMP1, "temp1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_TEMP1, VALUE(3), 2 },
{ SENSORS_LM85_TEMP2, "temp2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_TEMP2, VALUE(3), 2 },
{ SENSORS_LM85_TEMP3, "temp3", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_TEMP3, VALUE(3), 2 },
{ SENSORS_LM85_TEMP1_MIN, "temp1_min", SENSORS_LM85_TEMP1,
SENSORS_LM85_TEMP1, SENSORS_MODE_RW,
LM85_SYSCTL_TEMP1, VALUE(1), 2 },
{ SENSORS_LM85_TEMP2_MIN, "temp2_min", SENSORS_LM85_TEMP2,
SENSORS_LM85_TEMP2, SENSORS_MODE_RW,
LM85_SYSCTL_TEMP2, VALUE(1), 2 },
{ SENSORS_LM85_TEMP3_MIN, "temp3_min", SENSORS_LM85_TEMP3,
SENSORS_LM85_TEMP3, SENSORS_MODE_RW,
LM85_SYSCTL_TEMP3, VALUE(1), 2 },
{ SENSORS_LM85_TEMP1_MAX, "temp1_max", SENSORS_LM85_TEMP1,
SENSORS_LM85_TEMP1, SENSORS_MODE_RW,
LM85_SYSCTL_TEMP1, VALUE(2), 2 },
{ SENSORS_LM85_TEMP2_MAX, "temp2_max", SENSORS_LM85_TEMP2,
SENSORS_LM85_TEMP2, SENSORS_MODE_RW,
LM85_SYSCTL_TEMP2, VALUE(2), 2 },
{ SENSORS_LM85_TEMP3_MAX, "temp3_max", SENSORS_LM85_TEMP3,
SENSORS_LM85_TEMP3, SENSORS_MODE_RW,
LM85_SYSCTL_TEMP3, VALUE(2), 2 },
{ SENSORS_LM85_VID, "vid", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_VID, VALUE(1), 3 },
{ SENSORS_LM85_VRM, "vrm", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_RW, LM85_SYSCTL_VRM, VALUE(1), 1 },
{ SENSORS_LM85_ALARMS, "alarms", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_ALARMS, VALUE(1), 0 },
{ SENSORS_LM85_PWM1, "pwm1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_RW, LM85_SYSCTL_PWM1, VALUE(1), 0 },
{ SENSORS_LM85_PWM2, "pwm2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_RW, LM85_SYSCTL_PWM2, VALUE(1), 0 },
{ SENSORS_LM85_PWM3, "pwm3", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_RW, LM85_SYSCTL_PWM3, VALUE(1), 0 },
{ SENSORS_LM85_PWM1_SPINUP, "pwm1_spinup", SENSORS_LM85_PWM1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG1, VALUE(1), 1 },
{ SENSORS_LM85_PWM2_SPINUP, "pwm2_spinup", SENSORS_LM85_PWM2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG2, VALUE(1), 1 },
{ SENSORS_LM85_PWM3_SPINUP, "pwm3_spinup", SENSORS_LM85_PWM3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG3, VALUE(1), 1 },
{ SENSORS_LM85_PWM1_MIN, "pwm1_min", SENSORS_LM85_PWM1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG1, VALUE(2), 1 },
{ SENSORS_LM85_PWM2_MIN, "pwm2_min", SENSORS_LM85_PWM2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG2, VALUE(2), 1 },
{ SENSORS_LM85_PWM3_MIN, "pwm3_min", SENSORS_LM85_PWM3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG3, VALUE(2), 1 },
{ SENSORS_LM85_PWM1_FREQ, "pwm1_freq", SENSORS_LM85_PWM1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG1, VALUE(3), 1 },
{ SENSORS_LM85_PWM2_FREQ, "pwm2_freq", SENSORS_LM85_PWM2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG2, VALUE(3), 1 },
{ SENSORS_LM85_PWM3_FREQ, "pwm3_freq", SENSORS_LM85_PWM3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG3, VALUE(3), 1 },
{ SENSORS_LM85_PWM1_MIN_CTL, "pwm1_min_ctl", SENSORS_LM85_PWM1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG1, VALUE(4), 1 },
{ SENSORS_LM85_PWM2_MIN_CTL, "pwm2_min_ctl", SENSORS_LM85_PWM2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG2, VALUE(4), 1 },
{ SENSORS_LM85_PWM3_MIN_CTL, "pwm3_min_ctl", SENSORS_LM85_PWM3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG3, VALUE(4), 1 },
{ SENSORS_LM85_PWM1_INVERT, "pwm1_invert", SENSORS_LM85_PWM1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG1, VALUE(5), 0 },
{ SENSORS_LM85_PWM2_INVERT, "pwm2_invert", SENSORS_LM85_PWM2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG2, VALUE(5), 0 },
{ SENSORS_LM85_PWM3_INVERT, "pwm3_invert", SENSORS_LM85_PWM3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG3, VALUE(5), 0 },
{ SENSORS_LM85_PWM1_ZONE, "pwm1_zone", SENSORS_LM85_PWM1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_ZONE1, VALUE(1), 0 },
{ SENSORS_LM85_PWM2_ZONE, "pwm2_zone", SENSORS_LM85_PWM2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_ZONE2, VALUE(1), 0 },
{ SENSORS_LM85_PWM3_ZONE, "pwm3_zone", SENSORS_LM85_PWM3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_ZONE3, VALUE(1), 0 },
{ SENSORS_LM85_ZONE1_LIMIT, "zone1_limit", SENSORS_LM85_TEMP1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE1, VALUE(1), 1 },
{ SENSORS_LM85_ZONE2_LIMIT, "zone2_limit", SENSORS_LM85_TEMP2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE2, VALUE(1), 1 },
{ SENSORS_LM85_ZONE3_LIMIT, "zone3_limit", SENSORS_LM85_TEMP3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE3, VALUE(1), 1 },
{ SENSORS_LM85_ZONE1_HYST, "zone1_hyst", SENSORS_LM85_TEMP1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE1, VALUE(2), 1 },
{ SENSORS_LM85_ZONE2_HYST, "zone2_hyst", SENSORS_LM85_TEMP2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE2, VALUE(2), 1 },
{ SENSORS_LM85_ZONE3_HYST, "zone3_hyst", SENSORS_LM85_TEMP3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE3, VALUE(2), 1 },
{ SENSORS_LM85_ZONE1_RANGE, "zone1_range", SENSORS_LM85_TEMP1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE1, VALUE(3), 1 },
{ SENSORS_LM85_ZONE2_RANGE, "zone2_range", SENSORS_LM85_TEMP2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE2, VALUE(3), 1 },
{ SENSORS_LM85_ZONE3_RANGE, "zone3_range", SENSORS_LM85_TEMP3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE3, VALUE(3), 1 },
{ SENSORS_LM85_ZONE1_CRITICAL, "zone1_critical", SENSORS_LM85_TEMP1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE1, VALUE(4), 1 },
{ SENSORS_LM85_ZONE2_CRITICAL, "zone2_critical", SENSORS_LM85_TEMP2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE2, VALUE(4), 1 },
{ SENSORS_LM85_ZONE3_CRITICAL, "zone3_critical", SENSORS_LM85_TEMP3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE3, VALUE(4), 1 },
{ SENSORS_LM85_PWM1_SPINUP_CTL, "pwm1_spinup_ctl", SENSORS_LM85_PWM1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_SPINUP_CTL, VALUE(1), 0 },
{ SENSORS_LM85_PWM2_SPINUP_CTL, "pwm2_spinup_ctl", SENSORS_LM85_PWM2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_SPINUP_CTL, VALUE(2), 0 },
{ SENSORS_LM85_PWM3_SPINUP_CTL, "pwm3_spinup_ctl", SENSORS_LM85_PWM3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_SPINUP_CTL, VALUE(3), 0 },
{ SENSORS_LM85_FAN1_TACH_MODE, "fan1_tach_mode", SENSORS_LM85_FAN1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_TACH_MODE, VALUE(1), 0 },
{ SENSORS_LM85_FAN2_TACH_MODE, "fan2_tach_mode", SENSORS_LM85_FAN2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_TACH_MODE, VALUE(2), 0 },
{ SENSORS_LM85_FAN3_TACH_MODE, "fan3_tach_mode", SENSORS_LM85_FAN3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_TACH_MODE, VALUE(3), 0 },
{ SENSORS_LM85_ZONE1_SMOOTH, "zone1_smooth", SENSORS_LM85_TEMP1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_SMOOTH1, VALUE(1), 1 },
{ SENSORS_LM85_ZONE2_SMOOTH, "zone2_smooth", SENSORS_LM85_TEMP2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_SMOOTH2, VALUE(1), 1 },
{ SENSORS_LM85_ZONE3_SMOOTH, "zone3_smooth", SENSORS_LM85_TEMP3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_SMOOTH3, VALUE(1), 1 },
{ 0 }
};
/* NOTE: Many shared values with lm85_features !!! */
static sensors_chip_feature adm1027_features[] =
{
{ SENSORS_LM85_IN0, "in0", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_IN0, VALUE(3), 3 },
{ SENSORS_LM85_IN1, "in1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_IN1, VALUE(3), 3 },
{ SENSORS_LM85_IN2, "in2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_IN2, VALUE(3), 3 },
{ SENSORS_LM85_IN3, "in3", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_IN3, VALUE(3), 3 },
{ SENSORS_LM85_IN4, "in4", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_IN4, VALUE(3), 3 },
{ SENSORS_LM85_IN0_MIN, "in0_min", SENSORS_LM85_IN0, SENSORS_LM85_IN0,
SENSORS_MODE_RW, LM85_SYSCTL_IN0, VALUE(1), 3 },
{ SENSORS_LM85_IN1_MIN, "in1_min", SENSORS_LM85_IN1, SENSORS_LM85_IN1,
SENSORS_MODE_RW, LM85_SYSCTL_IN1, VALUE(1), 3 },
{ SENSORS_LM85_IN2_MIN, "in2_min", SENSORS_LM85_IN2, SENSORS_LM85_IN2,
SENSORS_MODE_RW, LM85_SYSCTL_IN2, VALUE(1), 3 },
{ SENSORS_LM85_IN3_MIN, "in3_min", SENSORS_LM85_IN3, SENSORS_LM85_IN3,
SENSORS_MODE_RW, LM85_SYSCTL_IN3, VALUE(1), 3 },
{ SENSORS_LM85_IN4_MIN, "in4_min", SENSORS_LM85_IN4, SENSORS_LM85_IN4,
SENSORS_MODE_RW, LM85_SYSCTL_IN4, VALUE(1), 3 },
{ SENSORS_LM85_IN0_MAX, "in0_max", SENSORS_LM85_IN0, SENSORS_LM85_IN0,
SENSORS_MODE_RW, LM85_SYSCTL_IN0, VALUE(2), 3 },
{ SENSORS_LM85_IN1_MAX, "in1_max", SENSORS_LM85_IN1, SENSORS_LM85_IN1,
SENSORS_MODE_RW, LM85_SYSCTL_IN1, VALUE(2), 3 },
{ SENSORS_LM85_IN2_MAX, "in2_max", SENSORS_LM85_IN2, SENSORS_LM85_IN2,
SENSORS_MODE_RW, LM85_SYSCTL_IN2, VALUE(2), 3 },
{ SENSORS_LM85_IN3_MAX, "in3_max", SENSORS_LM85_IN3, SENSORS_LM85_IN3,
SENSORS_MODE_RW, LM85_SYSCTL_IN3, VALUE(2), 3 },
{ SENSORS_LM85_IN4_MAX, "in4_max", SENSORS_LM85_IN4, SENSORS_LM85_IN4,
SENSORS_MODE_RW, LM85_SYSCTL_IN4, VALUE(2), 3 },
{ SENSORS_LM85_FAN1, "fan1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_FAN1, VALUE(2), 0 },
{ SENSORS_LM85_FAN2, "fan2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_FAN2, VALUE(2), 0 },
{ SENSORS_LM85_FAN3, "fan3", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_FAN3, VALUE(2), 0 },
{ SENSORS_LM85_FAN4, "fan4", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_FAN4, VALUE(2), 0 },
{ SENSORS_LM85_FAN1_MIN, "fan1_min", SENSORS_LM85_FAN1, SENSORS_LM85_FAN1,
SENSORS_MODE_RW, LM85_SYSCTL_FAN1, VALUE(1), 0 },
{ SENSORS_LM85_FAN2_MIN, "fan2_min", SENSORS_LM85_FAN2, SENSORS_LM85_FAN2,
SENSORS_MODE_RW, LM85_SYSCTL_FAN2, VALUE(1), 0 },
{ SENSORS_LM85_FAN3_MIN, "fan3_min", SENSORS_LM85_FAN3, SENSORS_LM85_FAN3,
SENSORS_MODE_RW, LM85_SYSCTL_FAN3, VALUE(1), 0 },
{ SENSORS_LM85_FAN4_MIN, "fan4_min", SENSORS_LM85_FAN4, SENSORS_LM85_FAN4,
SENSORS_MODE_RW, LM85_SYSCTL_FAN4, VALUE(1), 0 },
{ SENSORS_LM85_TEMP1, "temp1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_TEMP1, VALUE(3), 2 },
{ SENSORS_LM85_TEMP2, "temp2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_TEMP2, VALUE(3), 2 },
{ SENSORS_LM85_TEMP3, "temp3", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_TEMP3, VALUE(3), 2 },
{ SENSORS_LM85_TEMP1_MIN, "temp1_min", SENSORS_LM85_TEMP1,
SENSORS_LM85_TEMP1, SENSORS_MODE_RW,
LM85_SYSCTL_TEMP1, VALUE(1), 2 },
{ SENSORS_LM85_TEMP2_MIN, "temp2_min", SENSORS_LM85_TEMP2,
SENSORS_LM85_TEMP2, SENSORS_MODE_RW,
LM85_SYSCTL_TEMP2, VALUE(1), 2 },
{ SENSORS_LM85_TEMP3_MIN, "temp3_min", SENSORS_LM85_TEMP3,
SENSORS_LM85_TEMP3, SENSORS_MODE_RW,
LM85_SYSCTL_TEMP3, VALUE(1), 2 },
{ SENSORS_LM85_TEMP1_MAX, "temp1_max", SENSORS_LM85_TEMP1,
SENSORS_LM85_TEMP1, SENSORS_MODE_RW,
LM85_SYSCTL_TEMP1, VALUE(2), 2 },
{ SENSORS_LM85_TEMP2_MAX, "temp2_max", SENSORS_LM85_TEMP2,
SENSORS_LM85_TEMP2, SENSORS_MODE_RW,
LM85_SYSCTL_TEMP2, VALUE(2), 2 },
{ SENSORS_LM85_TEMP3_MAX, "temp3_max", SENSORS_LM85_TEMP3,
SENSORS_LM85_TEMP3, SENSORS_MODE_RW,
LM85_SYSCTL_TEMP3, VALUE(2), 2 },
{ SENSORS_LM85_VID, "vid", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_VID, VALUE(1), 3 },
{ SENSORS_LM85_VRM, "vrm", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_RW, LM85_SYSCTL_VRM, VALUE(1), 1 },
{ SENSORS_LM85_ALARMS, "alarms", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_R, LM85_SYSCTL_ALARMS, VALUE(1), 0 },
{ SENSORS_LM85_PWM1, "pwm1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_RW, LM85_SYSCTL_PWM1, VALUE(1), 0 },
{ SENSORS_LM85_PWM2, "pwm2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_RW, LM85_SYSCTL_PWM2, VALUE(1), 0 },
{ SENSORS_LM85_PWM3, "pwm3", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
SENSORS_MODE_RW, LM85_SYSCTL_PWM3, VALUE(1), 0 },
{ SENSORS_LM85_PWM1_SPINUP, "pwm1_spinup", SENSORS_LM85_PWM1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG1, VALUE(1), 1 },
{ SENSORS_LM85_PWM2_SPINUP, "pwm2_spinup", SENSORS_LM85_PWM2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG2, VALUE(1), 1 },
{ SENSORS_LM85_PWM3_SPINUP, "pwm3_spinup", SENSORS_LM85_PWM3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG3, VALUE(1), 1 },
{ SENSORS_LM85_PWM1_MIN, "pwm1_min", SENSORS_LM85_PWM1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG1, VALUE(2), 1 },
{ SENSORS_LM85_PWM2_MIN, "pwm2_min", SENSORS_LM85_PWM2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG2, VALUE(2), 1 },
{ SENSORS_LM85_PWM3_MIN, "pwm3_min", SENSORS_LM85_PWM3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG3, VALUE(2), 1 },
{ SENSORS_LM85_PWM1_FREQ, "pwm1_freq", SENSORS_LM85_PWM1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG1, VALUE(3), 1 },
{ SENSORS_LM85_PWM2_FREQ, "pwm2_freq", SENSORS_LM85_PWM2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG2, VALUE(3), 1 },
{ SENSORS_LM85_PWM3_FREQ, "pwm3_freq", SENSORS_LM85_PWM3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG3, VALUE(3), 1 },
{ SENSORS_LM85_PWM1_MIN_CTL, "pwm1_min_ctl", SENSORS_LM85_PWM1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG1, VALUE(4), 1 },
{ SENSORS_LM85_PWM2_MIN_CTL, "pwm2_min_ctl", SENSORS_LM85_PWM2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG2, VALUE(4), 1 },
{ SENSORS_LM85_PWM3_MIN_CTL, "pwm3_min_ctl", SENSORS_LM85_PWM3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG3, VALUE(4), 1 },
{ SENSORS_LM85_PWM1_INVERT, "pwm1_invert", SENSORS_LM85_PWM1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG1, VALUE(5), 0 },
{ SENSORS_LM85_PWM2_INVERT, "pwm2_invert", SENSORS_LM85_PWM2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG2, VALUE(5), 0 },
{ SENSORS_LM85_PWM3_INVERT, "pwm3_invert", SENSORS_LM85_PWM3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_CFG3, VALUE(5), 0 },
{ SENSORS_LM85_PWM1_ZONE, "pwm1_zone", SENSORS_LM85_PWM1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_ZONE1, VALUE(1), 0 },
{ SENSORS_LM85_PWM2_ZONE, "pwm2_zone", SENSORS_LM85_PWM2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_ZONE2, VALUE(1), 0 },
{ SENSORS_LM85_PWM3_ZONE, "pwm3_zone", SENSORS_LM85_PWM3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_PWM_ZONE3, VALUE(1), 0 },
{ SENSORS_LM85_ZONE1_LIMIT, "zone1_limit", SENSORS_LM85_TEMP1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE1, VALUE(1), 1 },
{ SENSORS_LM85_ZONE2_LIMIT, "zone2_limit", SENSORS_LM85_TEMP2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE2, VALUE(1), 1 },
{ SENSORS_LM85_ZONE3_LIMIT, "zone3_limit", SENSORS_LM85_TEMP3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE3, VALUE(1), 1 },
{ SENSORS_LM85_ZONE1_HYST, "zone1_hyst", SENSORS_LM85_TEMP1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE1, VALUE(2), 1 },
{ SENSORS_LM85_ZONE2_HYST, "zone2_hyst", SENSORS_LM85_TEMP2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE2, VALUE(2), 1 },
{ SENSORS_LM85_ZONE3_HYST, "zone3_hyst", SENSORS_LM85_TEMP3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE3, VALUE(2), 1 },
{ SENSORS_LM85_ZONE1_RANGE, "zone1_range", SENSORS_LM85_TEMP1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE1, VALUE(3), 1 },
{ SENSORS_LM85_ZONE2_RANGE, "zone2_range", SENSORS_LM85_TEMP2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE2, VALUE(3), 1 },
{ SENSORS_LM85_ZONE3_RANGE, "zone3_range", SENSORS_LM85_TEMP3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE3, VALUE(3), 1 },
{ SENSORS_LM85_ZONE1_CRITICAL, "zone1_critical", SENSORS_LM85_TEMP1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE1, VALUE(4), 1 },
{ SENSORS_LM85_ZONE2_CRITICAL, "zone2_critical", SENSORS_LM85_TEMP2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE2, VALUE(4), 1 },
{ SENSORS_LM85_ZONE3_CRITICAL, "zone3_critical", SENSORS_LM85_TEMP3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_ZONE3, VALUE(4), 1 },
{ SENSORS_ADM1027_FAN1_TACH_MODE, "fan1_tach_mode", SENSORS_LM85_FAN1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
ADM1027_SYSCTL_TACH_MODE, VALUE(1), 0 },
{ SENSORS_ADM1027_FAN2_TACH_MODE, "fan2_tach_mode", SENSORS_LM85_FAN2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
ADM1027_SYSCTL_TACH_MODE, VALUE(2), 0 },
{ SENSORS_ADM1027_FAN3_TACH_MODE, "fan3_tach_mode", SENSORS_LM85_FAN3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
ADM1027_SYSCTL_TACH_MODE, VALUE(3), 0 },
{ SENSORS_ADM1027_FAN4_TACH_MODE, "fan4_tach_mode", SENSORS_LM85_FAN4,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
ADM1027_SYSCTL_TACH_MODE, VALUE(4), 0 },
{ SENSORS_ADM1027_PWM1_SMOOTH, "pwm1_smooth", SENSORS_LM85_PWM1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_SMOOTH1, VALUE(1), 1 },
{ SENSORS_ADM1027_PWM2_SMOOTH, "pwm2_smooth", SENSORS_LM85_PWM2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_SMOOTH2, VALUE(1), 1 },
{ SENSORS_ADM1027_PWM3_SMOOTH, "pwm3_smooth", SENSORS_LM85_PWM3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
LM85_SYSCTL_SMOOTH3, VALUE(1), 1 },
{ SENSORS_ADM1027_TEMP1_OFFSET, "temp1_offset", SENSORS_LM85_TEMP1,
SENSORS_LM85_TEMP1, SENSORS_MODE_RW,
ADM1027_SYSCTL_TEMP_OFFSET1, VALUE(1), 2 },
{ SENSORS_ADM1027_TEMP2_OFFSET, "temp2_offset", SENSORS_LM85_TEMP2,
SENSORS_LM85_TEMP2, SENSORS_MODE_RW,
ADM1027_SYSCTL_TEMP_OFFSET2, VALUE(1), 2 },
{ SENSORS_ADM1027_TEMP3_OFFSET, "temp3_offset", SENSORS_LM85_TEMP3,
SENSORS_LM85_TEMP3, SENSORS_MODE_RW,
ADM1027_SYSCTL_TEMP_OFFSET3, VALUE(1), 2 },
{ SENSORS_ADM1027_FAN1_PPR, "fan1_ppr", SENSORS_LM85_FAN1,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
ADM1027_SYSCTL_FAN_PPR, VALUE(1), 0 },
{ SENSORS_ADM1027_FAN2_PPR, "fan2_ppr", SENSORS_LM85_FAN2,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
ADM1027_SYSCTL_FAN_PPR, VALUE(2), 0 },
{ SENSORS_ADM1027_FAN3_PPR, "fan3_ppr", SENSORS_LM85_FAN3,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
ADM1027_SYSCTL_FAN_PPR, VALUE(3), 0 },
{ SENSORS_ADM1027_FAN4_PPR, "fan4_ppr", SENSORS_LM85_FAN4,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
ADM1027_SYSCTL_FAN_PPR, VALUE(4), 0 },
{ SENSORS_ADM1027_ALARM_MASK, "alarm_mask", SENSORS_NO_MAPPING,
SENSORS_NO_MAPPING, SENSORS_MODE_RW,
ADM1027_SYSCTL_ALARM_MASK, VALUE(1), 0 },
{ 0 }
};
static sensors_chip_feature lm87_features[] = static sensors_chip_feature lm87_features[] =
{ {
{ SENSORS_LM87_IN0, "2.5V", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, { SENSORS_LM87_IN0, "2.5V", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING,
@@ -3390,5 +3820,10 @@ sensors_chip_features sensors_chip_features_list[] =
{ SENSORS_LM92_PREFIX, lm92_features }, { SENSORS_LM92_PREFIX, lm92_features },
{ SENSORS_VT8231_PREFIX, vt8231_features }, { SENSORS_VT8231_PREFIX, vt8231_features },
{ SENSORS_BMC_PREFIX, bmc_features }, { SENSORS_BMC_PREFIX, bmc_features },
{ SENSORS_LM85_PREFIX, lm85_features },
{ SENSORS_LM85B_PREFIX, lm85_features },
{ SENSORS_LM85C_PREFIX, lm85_features },
{ SENSORS_ADM1027_PREFIX, adm1027_features },
{ SENSORS_ADT7463_PREFIX, adm1027_features },
{ 0 } { 0 }
}; };

View File

@@ -317,6 +317,106 @@
#define SENSORS_LM80_FAN2_DIV 72 /* RW */ #define SENSORS_LM80_FAN2_DIV 72 /* RW */
#define SENSORS_LM80_ALARMS 81 /* R */ #define SENSORS_LM80_ALARMS 81 /* R */
/* LM85 chips */
#define SENSORS_LM85_PREFIX "lm85"
#define SENSORS_LM85B_PREFIX "lm85b"
#define SENSORS_LM85C_PREFIX "lm85c"
#define SENSORS_ADM1027_PREFIX "adm1027"
#define SENSORS_ADT7463_PREFIX "adt7463"
#define SENSORS_ADM1027_ALARM_MASK 1 /* RW -- alarm_mask */
#define SENSORS_ADM1027_FAN1_PPR 2 /* RW -- fan1_ppr */
#define SENSORS_ADM1027_FAN1_TACH_MODE 3 /* RW -- fan1_tach_mode */
#define SENSORS_ADM1027_FAN2_PPR 4 /* RW -- fan2_ppr */
#define SENSORS_ADM1027_FAN2_TACH_MODE 5 /* RW -- fan2_tach_mode */
#define SENSORS_ADM1027_FAN3_PPR 6 /* RW -- fan3_ppr */
#define SENSORS_ADM1027_FAN3_TACH_MODE 7 /* RW -- fan3_tach_mode */
#define SENSORS_ADM1027_FAN4_PPR 8 /* RW -- fan4_ppr */
#define SENSORS_ADM1027_FAN4_TACH_MODE 9 /* RW -- fan4_tach_mode */
#define SENSORS_ADM1027_PWM1_SMOOTH 10 /* RW -- pwm1_smooth */
#define SENSORS_ADM1027_PWM2_SMOOTH 11 /* RW -- pwm2_smooth */
#define SENSORS_ADM1027_PWM3_SMOOTH 12 /* RW -- pwm3_smooth */
#define SENSORS_ADM1027_TEMP1_OFFSET 13 /* RW -- temp1_offset */
#define SENSORS_ADM1027_TEMP2_OFFSET 14 /* RW -- temp2_offset */
#define SENSORS_ADM1027_TEMP3_OFFSET 15 /* RW -- temp3_offset */
#define SENSORS_LM85_ALARMS 16 /* R -- alarms */
#define SENSORS_LM85_FAN1 17 /* R -- fan1 */
#define SENSORS_LM85_FAN1_MIN 18 /* RW -- fan1_min */
#define SENSORS_LM85_FAN1_TACH_MODE 19 /* RW -- fan1_tach_mode */
#define SENSORS_LM85_FAN2 20 /* R -- fan2 */
#define SENSORS_LM85_FAN2_MIN 21 /* RW -- fan2_min */
#define SENSORS_LM85_FAN2_TACH_MODE 22 /* RW -- fan2_tach_mode */
#define SENSORS_LM85_FAN3 23 /* R -- fan3 */
#define SENSORS_LM85_FAN3_MIN 24 /* RW -- fan3_min */
#define SENSORS_LM85_FAN3_TACH_MODE 25 /* RW -- fan3_tach_mode */
#define SENSORS_LM85_FAN4 26 /* R -- fan4 */
#define SENSORS_LM85_FAN4_MIN 27 /* RW -- fan4_min */
#define SENSORS_LM85_IN0 28 /* R -- in0 */
#define SENSORS_LM85_IN0_MAX 29 /* RW -- in0_max */
#define SENSORS_LM85_IN0_MIN 30 /* RW -- in0_min */
#define SENSORS_LM85_IN1 31 /* R -- in1 */
#define SENSORS_LM85_IN1_MAX 32 /* RW -- in1_max */
#define SENSORS_LM85_IN1_MIN 33 /* RW -- in1_min */
#define SENSORS_LM85_IN2 34 /* R -- in2 */
#define SENSORS_LM85_IN2_MAX 35 /* RW -- in2_max */
#define SENSORS_LM85_IN2_MIN 36 /* RW -- in2_min */
#define SENSORS_LM85_IN3 37 /* R -- in3 */
#define SENSORS_LM85_IN3_MAX 38 /* RW -- in3_max */
#define SENSORS_LM85_IN3_MIN 39 /* RW -- in3_min */
#define SENSORS_LM85_IN4 40 /* R -- in4 */
#define SENSORS_LM85_IN4_MAX 41 /* RW -- in4_max */
#define SENSORS_LM85_IN4_MIN 42 /* RW -- in4_min */
#define SENSORS_LM85_PWM1 43 /* RW -- pwm1 */
#define SENSORS_LM85_PWM1_FREQ 44 /* RW -- pwm1_freq */
#define SENSORS_LM85_PWM1_INVERT 45 /* RW -- pwm1_invert */
#define SENSORS_LM85_PWM1_MIN 46 /* RW -- pwm1_min */
#define SENSORS_LM85_PWM1_MIN_CTL 47 /* RW -- pwm1_min_ctl */
#define SENSORS_LM85_PWM1_SPINUP 48 /* RW -- pwm1_spinup */
#define SENSORS_LM85_PWM1_SPINUP_CTL 49 /* RW -- pwm1_spinup_ctl */
#define SENSORS_LM85_PWM1_ZONE 50 /* RW -- pwm1_zone */
#define SENSORS_LM85_PWM2 51 /* RW -- pwm2 */
#define SENSORS_LM85_PWM2_FREQ 52 /* RW -- pwm2_freq */
#define SENSORS_LM85_PWM2_INVERT 53 /* RW -- pwm2_invert */
#define SENSORS_LM85_PWM2_MIN 54 /* RW -- pwm2_min */
#define SENSORS_LM85_PWM2_MIN_CTL 55 /* RW -- pwm2_min_ctl */
#define SENSORS_LM85_PWM2_SPINUP 56 /* RW -- pwm2_spinup */
#define SENSORS_LM85_PWM2_SPINUP_CTL 57 /* RW -- pwm2_spinup_ctl */
#define SENSORS_LM85_PWM2_ZONE 58 /* RW -- pwm2_zone */
#define SENSORS_LM85_PWM3 59 /* RW -- pwm3 */
#define SENSORS_LM85_PWM3_FREQ 60 /* RW -- pwm3_freq */
#define SENSORS_LM85_PWM3_INVERT 61 /* RW -- pwm3_invert */
#define SENSORS_LM85_PWM3_MIN 62 /* RW -- pwm3_min */
#define SENSORS_LM85_PWM3_MIN_CTL 63 /* RW -- pwm3_min_ctl */
#define SENSORS_LM85_PWM3_SPINUP 64 /* RW -- pwm3_spinup */
#define SENSORS_LM85_PWM3_SPINUP_CTL 65 /* RW -- pwm3_spinup_ctl */
#define SENSORS_LM85_PWM3_ZONE 66 /* RW -- pwm3_zone */
#define SENSORS_LM85_TEMP1 67 /* R -- temp1 */
#define SENSORS_LM85_TEMP1_MAX 68 /* RW -- temp1_max */
#define SENSORS_LM85_TEMP1_MIN 69 /* RW -- temp1_min */
#define SENSORS_LM85_TEMP2 70 /* R -- temp2 */
#define SENSORS_LM85_TEMP2_MAX 71 /* RW -- temp2_max */
#define SENSORS_LM85_TEMP2_MIN 72 /* RW -- temp2_min */
#define SENSORS_LM85_TEMP3 73 /* R -- temp3 */
#define SENSORS_LM85_TEMP3_MAX 74 /* RW -- temp3_max */
#define SENSORS_LM85_TEMP3_MIN 75 /* RW -- temp3_min */
#define SENSORS_LM85_VID 76 /* R -- vid */
#define SENSORS_LM85_VRM 77 /* RW -- vrm */
#define SENSORS_LM85_ZONE1_CRITICAL 78 /* RW -- zone1_critical */
#define SENSORS_LM85_ZONE1_HYST 79 /* RW -- zone1_hyst */
#define SENSORS_LM85_ZONE1_LIMIT 80 /* RW -- zone1_limit */
#define SENSORS_LM85_ZONE1_RANGE 81 /* RW -- zone1_range */
#define SENSORS_LM85_ZONE1_SMOOTH 82 /* RW -- zone1_smooth */
#define SENSORS_LM85_ZONE2_CRITICAL 83 /* RW -- zone2_critical */
#define SENSORS_LM85_ZONE2_HYST 84 /* RW -- zone2_hyst */
#define SENSORS_LM85_ZONE2_LIMIT 85 /* RW -- zone2_limit */
#define SENSORS_LM85_ZONE2_RANGE 86 /* RW -- zone2_range */
#define SENSORS_LM85_ZONE2_SMOOTH 87 /* RW -- zone2_smooth */
#define SENSORS_LM85_ZONE3_CRITICAL 88 /* RW -- zone3_critical */
#define SENSORS_LM85_ZONE3_HYST 89 /* RW -- zone3_hyst */
#define SENSORS_LM85_ZONE3_LIMIT 90 /* RW -- zone3_limit */
#define SENSORS_LM85_ZONE3_RANGE 91 /* RW -- zone3_range */
#define SENSORS_LM85_ZONE3_SMOOTH 92 /* RW -- zone3_smooth */
/* Winbond W83781D chips */ /* Winbond W83781D chips */

View File

@@ -27,6 +27,7 @@ if [ "$CONFIG_I2C_PROC" = "m" -o "$CONFIG_I2C_PROC" = "y" ] ; then
dep_tristate ' National Semiconductor LM75 and compatibles' CONFIG_SENSORS_LM75 $CONFIG_I2C $CONFIG_I2C_PROC dep_tristate ' National Semiconductor LM75 and compatibles' CONFIG_SENSORS_LM75 $CONFIG_I2C $CONFIG_I2C_PROC
dep_tristate ' National Semiconductor LM78' CONFIG_SENSORS_LM78 $CONFIG_I2C $CONFIG_I2C_PROC dep_tristate ' National Semiconductor LM78' CONFIG_SENSORS_LM78 $CONFIG_I2C $CONFIG_I2C_PROC
dep_tristate ' National Semiconductor LM80' CONFIG_SENSORS_LM80 $CONFIG_I2C $CONFIG_I2C_PROC dep_tristate ' National Semiconductor LM80' CONFIG_SENSORS_LM80 $CONFIG_I2C $CONFIG_I2C_PROC
dep_tristate ' National Semiconductor LM85, Analog Devices ADM1027' CONFIG_SENSORS_LM85 $CONFIG_I2C $CONFIG_I2C_PROC
dep_tristate ' National Semiconductor LM87' CONFIG_SENSORS_LM87 $CONFIG_I2C $CONFIG_I2C_PROC dep_tristate ' National Semiconductor LM87' CONFIG_SENSORS_LM87 $CONFIG_I2C $CONFIG_I2C_PROC
dep_tristate ' National Semiconductor LM92' CONFIG_SENSORS_LM92 $CONFIG_I2C $CONFIG_I2C_PROC dep_tristate ' National Semiconductor LM92' CONFIG_SENSORS_LM92 $CONFIG_I2C $CONFIG_I2C_PROC
dep_tristate ' Silicon Integrated Systems Corp. SiS5595' CONFIG_SENSORS_SIS5595 $CONFIG_I2C $CONFIG_I2C_PROC $CONFIG_I2C_ISA dep_tristate ' Silicon Integrated Systems Corp. SiS5595' CONFIG_SENSORS_SIS5595 $CONFIG_I2C $CONFIG_I2C_PROC $CONFIG_I2C_ISA

View File

@@ -34,6 +34,7 @@ kernel/chips/it87.c drivers/sensors/it87.c
kernel/chips/lm75.c drivers/sensors/lm75.c kernel/chips/lm75.c drivers/sensors/lm75.c
kernel/chips/lm78.c drivers/sensors/lm78.c kernel/chips/lm78.c drivers/sensors/lm78.c
kernel/chips/lm80.c drivers/sensors/lm80.c kernel/chips/lm80.c drivers/sensors/lm80.c
kernel/chips/lm85.c drivers/sensors/lm85.c
kernel/chips/lm87.c drivers/sensors/lm87.c kernel/chips/lm87.c drivers/sensors/lm87.c
kernel/chips/lm92.c drivers/sensors/lm92.c kernel/chips/lm92.c drivers/sensors/lm92.c
kernel/chips/matorb.c drivers/sensors/matorb.c kernel/chips/matorb.c drivers/sensors/matorb.c

View File

@@ -886,6 +886,7 @@ obj-$(CONFIG_SENSORS_IT87) += it87.o
obj-$(CONFIG_SENSORS_LM75) += lm75.o obj-$(CONFIG_SENSORS_LM75) += lm75.o
obj-$(CONFIG_SENSORS_LM78) += lm78.o obj-$(CONFIG_SENSORS_LM78) += lm78.o
obj-$(CONFIG_SENSORS_LM80) += lm80.o obj-$(CONFIG_SENSORS_LM80) += lm80.o
obj-$(CONFIG_SENSORS_LM85) += lm85.o
obj-$(CONFIG_SENSORS_LM87) += lm87.o obj-$(CONFIG_SENSORS_LM87) += lm87.o
obj-$(CONFIG_SENSORS_LM92) += lm92.o obj-$(CONFIG_SENSORS_LM92) += lm92.o
obj-$(CONFIG_SENSORS_MAXILIFE) += maxilife.o obj-$(CONFIG_SENSORS_MAXILIFE) += maxilife.o

View File

@@ -794,9 +794,15 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
}, },
{ {
name => "National Semiconductor LM85", name => "National Semiconductor LM85",
driver => "Unwritten: lm85", driver => "lm85",
i2c_addrs => [0x2c..0x2e], i2c_addrs => [0x2c..0x2e],
i2c_detect => sub { lm85_detect @_}, i2c_detect => sub { lm85_detect 0x01, @_},
},
{
name => "Analog Devices ADM1027 or ADT7463",
driver => "lm85",
i2c_addrs => [0x2c..0x2e],
i2c_detect => sub { lm85_detect 0x41, @_},
}, },
{ {
name => "National Semiconductor LM87", name => "National Semiconductor LM87",
@@ -2219,18 +2225,21 @@ sub lm80_detect
return (3); return (3);
} }
# $_[0]: A reference to the file descriptor to access this chip. # $_[0]: Vendor to check for
# #_[1]: Base address. # (0x01 = National Semi, 0x41 = Analog Dev)
# $_[1]: A reference to the file descriptor to access this chip.
# #_[2]: Base address.
# Returns: undef if not detected, (7) if detected. # Returns: undef if not detected, (7) if detected.
# Registers used: 0x3e == Vendor register. # Registers used: 0x3e == Vendor register.
# 0x3f == Version/Stepping register. # 0x3f == Version/Stepping register.
# Constants used: 0x01 == National Semiconductor Vendor Id. # Constants used: 0x01 == National Semiconductor Vendor Id.
# 0x41 == Analog Devices Vendor Id.
# 0x60 == Version number. The lower 4 stepping # 0x60 == Version number. The lower 4 stepping
# bits are masked and ignored. # bits are masked and ignored.
sub lm85_detect sub lm85_detect
{ {
my ($file,$addr) = @_; my ($vendor,$file,$addr) = @_;
return if (i2c_smbus_read_byte_data($file,0x3e)) != 0x01; return if (i2c_smbus_read_byte_data($file,0x3e)) != $vendor ;
return if (i2c_smbus_read_byte_data($file,0x3f) & 0xf0) != 0x60; return if (i2c_smbus_read_byte_data($file,0x3f) & 0xf0) != 0x60;
return (7); return (7);
} }

View File

@@ -1468,6 +1468,244 @@ void print_lm80(const sensors_chip_name *name)
free_the_label(&label); free_the_label(&label);
} }
void print_lm85(const sensors_chip_name *name)
{
char *label = NULL;
double cur, min, max;
int alarms, alarm_mask, valid;
int is85, is1027;
is85 = !strcmp(name->prefix,"lm85")
|| !strcmp(name->prefix,"lm85b")
|| !strcmp(name->prefix,"lm85c") ;
is1027 = !strcmp(name->prefix,"adm1027")
|| !strcmp(name->prefix,"adt7463") ;
if (!sensors_get_feature(*name,SENSORS_LM85_ALARMS,&cur))
alarms = cur + 0.5;
else {
printf("ERROR: Can't get alarm data!\n");
alarms = 0;
}
if (!sensors_get_feature(*name,SENSORS_ADM1027_ALARM_MASK,&cur))
alarm_mask = cur + 0.5;
else {
printf("ERROR: Can't get alarm mask data!\n");
alarm_mask = 0;
}
if (!sensors_get_label_and_valid(*name,SENSORS_LM85_IN0,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_LM85_IN0,&cur) &&
!sensors_get_feature(*name,SENSORS_LM85_IN0_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_LM85_IN0_MAX,&max)) {
if (valid) {
print_label(label,10);
printf("%+7.*f V (min = %+6.2f V, max = %+6.2f V) %s",
(is1027?3:2),cur,min,max,alarms&LM85_ALARM_IN0?"ALARM":"");
if (is1027) { printf(alarm_mask&LM85_ALARM_IN0?" MASKED":""); }
putchar( '\n' );
}
} else
printf("ERROR: Can't get IN0 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_LM85_IN1,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_LM85_IN1,&cur) &&
!sensors_get_feature(*name,SENSORS_LM85_IN1_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_LM85_IN1_MAX,&max)) {
if (valid) {
print_label(label,10);
printf("%+7.*f V (min = %+6.2f V, max = %+6.2f V) %s",
(is1027?3:2),cur,min,max,alarms&LM85_ALARM_IN1?"ALARM":"");
if (is1027) { printf(alarm_mask&LM85_ALARM_IN1?" MASKED":""); }
putchar( '\n' );
}
} else
printf("ERROR: Can't get IN1 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_LM85_IN2,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_LM85_IN2,&cur) &&
!sensors_get_feature(*name,SENSORS_LM85_IN2_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_LM85_IN2_MAX,&max)) {
if (valid) {
print_label(label,10);
printf("%+7.*f V (min = %+6.2f V, max = %+6.2f V) %s",
(is1027?3:2),cur,min,max,alarms&LM85_ALARM_IN2?"ALARM":"");
if (is1027) { printf(alarm_mask&LM85_ALARM_IN2?" MASKED":""); }
putchar( '\n' );
}
} else
printf("ERROR: Can't get IN2 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_LM85_IN3,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_LM85_IN3,&cur) &&
!sensors_get_feature(*name,SENSORS_LM85_IN3_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_LM85_IN3_MAX,&max)) {
if (valid) {
print_label(label,10);
printf("%+6.*f V (min = %+6.2f V, max = %+6.2f V) %s",
(is1027?3:2),cur,min,max,alarms&LM85_ALARM_IN3?"ALARM":"");
if (is1027) { printf(alarm_mask&LM85_ALARM_IN3?" MASKED":""); }
putchar( '\n' );
}
} else
printf("ERROR: Can't get IN3 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_LM85_IN4,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_LM85_IN4,&cur) &&
!sensors_get_feature(*name,SENSORS_LM85_IN4_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_LM85_IN4_MAX,&max)) {
if (valid) {
print_label(label,10);
printf("%+6.*f V (min = %+6.2f V, max = %+6.2f V) %s",
(is1027?3:2),cur,min,max,alarms&LM85_ALARM_IN4?"ALARM":"");
if (is1027) { printf(alarm_mask&LM85_ALARM_IN4?" MASKED":""); }
putchar( '\n' );
}
} else
printf("ERROR: Can't get IN4 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_LM85_FAN1,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_LM85_FAN1,&cur) &&
!sensors_get_feature(*name,SENSORS_LM85_FAN1_MIN,&min)) {
if (valid) {
print_label(label,10);
printf("%5.0f RPM (min = %4.0f RPM) %s",
cur,min, alarms&LM85_ALARM_FAN1?"ALARM":"");
if (is1027) { printf(alarm_mask&LM85_ALARM_FAN1?" MASKED":""); }
putchar( '\n' );
}
} else
printf("ERROR: Can't get FAN1 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_LM85_FAN2,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_LM85_FAN2,&cur) &&
!sensors_get_feature(*name,SENSORS_LM85_FAN2_MIN,&min)) {
if (valid) {
print_label(label,10);
printf("%5.0f RPM (min = %4.0f RPM) %s",
cur,min, alarms&LM85_ALARM_FAN2?"ALARM":"");
if (is1027) { printf(alarm_mask&LM85_ALARM_FAN2?" MASKED":""); }
putchar( '\n' );
}
} else
printf("ERROR: Can't get FAN2 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_LM85_FAN3,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_LM85_FAN3,&cur) &&
!sensors_get_feature(*name,SENSORS_LM85_FAN3_MIN,&min)) {
if (valid) {
print_label(label,10);
printf("%5.0f RPM (min = %4.0f RPM) %s",
cur,min, alarms&LM85_ALARM_FAN3?"ALARM":"");
if (is1027) { printf(alarm_mask&LM85_ALARM_FAN3?" MASKED":""); }
putchar( '\n' );
}
} else
printf("ERROR: Can't get FAN3 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_LM85_FAN4,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_LM85_FAN4,&cur) &&
!sensors_get_feature(*name,SENSORS_LM85_FAN4_MIN,&min)) {
if (valid) {
print_label(label,10);
printf("%5.0f RPM (min = %4.0f RPM) %s",
cur,min, alarms&LM85_ALARM_FAN4?"ALARM":"");
if (is1027) { printf(alarm_mask&LM85_ALARM_FAN4?" MASKED":""); }
putchar( '\n' );
}
} else
printf("ERROR: Can't get FAN4 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_LM85_TEMP1,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_LM85_TEMP1,&cur) &&
!sensors_get_feature(*name,SENSORS_LM85_TEMP1_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_LM85_TEMP1_MAX,&max)) {
if (valid) {
print_label(label,10);
print_temp_info( cur, max, min, MINMAX, (is1027 ? 2 : 0), 0);
printf( " %s %s %s\n",
alarms&LM85_ALARM_TEMP1?"ALARM":"",
alarms&LM85_ALARM_TEMP1_FAULT?"FAULT":"",
is1027&&(alarm_mask&LM85_ALARM_TEMP1)?"MASKED":""
);
}
} else
printf("ERROR: Can't get TEMP1 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_LM85_TEMP2,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_LM85_TEMP2,&cur) &&
!sensors_get_feature(*name,SENSORS_LM85_TEMP2_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_LM85_TEMP2_MAX,&max)) {
if (valid) {
print_label(label,10);
print_temp_info( cur, max, min, MINMAX, (is1027 ? 2 : 0), 0);
printf( " %s %s\n",
alarms&LM85_ALARM_TEMP2?"ALARM":"",
is1027&&(alarm_mask&LM85_ALARM_TEMP2)?"MASKED":""
);
}
} else
printf("ERROR: Can't get TEMP2 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_LM85_TEMP3,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_LM85_TEMP3,&cur) &&
!sensors_get_feature(*name,SENSORS_LM85_TEMP3_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_LM85_TEMP3_MAX,&max)) {
if (valid) {
print_label(label,10);
print_temp_info( cur, max, min, MINMAX, (is1027 ? 2 : 0), 0);
printf( " %s %s %s\n",
alarms&LM85_ALARM_TEMP3?"ALARM":"",
alarms&LM85_ALARM_TEMP3_FAULT?"FAULT":"",
is1027&&(alarm_mask&LM85_ALARM_TEMP3)?"MASKED":""
);
}
} else
printf("ERROR: Can't get TEMP3 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_LM85_PWM1,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_LM85_PWM1,&cur)) {
if (valid) {
print_label(label,10);
printf("%4.0f\n", cur);
}
} else
printf("ERROR: Can't get PWM1 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_LM85_PWM2,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_LM85_PWM2,&cur)) {
if (valid) {
print_label(label,10);
printf("%4.0f\n", cur);
}
} else
printf("ERROR: Can't get PWM2 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_LM85_PWM3,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_LM85_PWM3,&cur)) {
if (valid) {
print_label(label,10);
printf("%4.0f\n", cur);
}
} else
printf("ERROR: Can't get PWM3 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_LM85_VID,&label,&valid)
&& !sensors_get_feature(*name,SENSORS_LM85_VID,&cur)
&& !sensors_get_feature(*name,SENSORS_LM85_VRM,&min) ) {
if (valid) {
print_label(label,10);
printf("%+6.3f V (VRM Version %4.1f)\n",cur,min);
}
}
free_the_label(&label);
}
void print_lm87(const sensors_chip_name *name) void print_lm87(const sensors_chip_name *name)
{ {
char *label = NULL; char *label = NULL;

View File

@@ -36,6 +36,7 @@ extern void print_sis5595(const sensors_chip_name *name);
extern void print_via686a(const sensors_chip_name *name); extern void print_via686a(const sensors_chip_name *name);
extern void print_gl518(const sensors_chip_name *name); extern void print_gl518(const sensors_chip_name *name);
extern void print_lm80(const sensors_chip_name *name); extern void print_lm80(const sensors_chip_name *name);
extern void print_lm85(const sensors_chip_name *name);
extern void print_w83781d(const sensors_chip_name *name); extern void print_w83781d(const sensors_chip_name *name);
extern void print_maxilife(const sensors_chip_name *name); extern void print_maxilife(const sensors_chip_name *name);
extern void print_ddcmon(const sensors_chip_name *name); extern void print_ddcmon(const sensors_chip_name *name);

View File

@@ -320,6 +320,12 @@ void do_a_print(sensors_chip_name name)
print_via686a(&name); print_via686a(&name);
else if (!strcmp(name.prefix,"lm80")) else if (!strcmp(name.prefix,"lm80"))
print_lm80(&name); print_lm80(&name);
else if (!strcmp(name.prefix,"lm85") ||
!strcmp(name.prefix,"lm85b") ||
!strcmp(name.prefix,"lm85c") ||
!strcmp(name.prefix,"adm1027") ||
!strcmp(name.prefix,"adt7463") )
print_lm85(&name);
else if (!strcmp(name.prefix,"lm87")) else if (!strcmp(name.prefix,"lm87"))
print_lm87(&name); print_lm87(&name);
else if (!strcmp(name.prefix,"gl518sm")) else if (!strcmp(name.prefix,"gl518sm"))