mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-08 16:11:26 +00:00
Support the LM99 (and LM89).
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2471 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
07575dbb7f
commit
635b1b06bc
8 files changed
+83
-56
No files matched your search
@@ -135,7 +135,10 @@ lm87
|
||||
|
||||
lm90
|
||||
lm90 2 - - - yes no
|
||||
lm99 2 - - - yes no
|
||||
adm1032 2 - - - yes no
|
||||
(lm89 is detected as an lm99)
|
||||
lm89 2 - - - yes no
|
||||
|
||||
lm92
|
||||
(all are reported as an "lm92")
|
||||
|
||||
+31
-40
@@ -1,7 +1,7 @@
|
||||
Kernel driver `lm90.o'
|
||||
=====================
|
||||
======================
|
||||
|
||||
Status: Complete and reasonably tested
|
||||
Status: Complete and well tested
|
||||
|
||||
Supported chips:
|
||||
* National Semiconductor LM90
|
||||
@@ -9,6 +9,16 @@ Supported chips:
|
||||
Addresses scanned: I2C 0x4c
|
||||
Datasheet: Publicly available at the National Semiconductor website
|
||||
http://www.national.com/pf/LM/LM90.html
|
||||
* National Semiconductor LM89
|
||||
Prefix: `lm99'
|
||||
Addresses scanned: I2C 0x4c and 0x4d
|
||||
Datasheet: Publicly available at the National Semiconductor website
|
||||
http://www.national.com/pf/LM/LM89.html
|
||||
* National Semiconductor LM99
|
||||
Prefix: `lm99'
|
||||
Addresses scanned: I2C 0x4c and 0x4d
|
||||
Datasheet: Publicly available at the National Semiconductor website
|
||||
http://www.national.com/pf/LM/LM99.html
|
||||
* Analog Devices ADM1032
|
||||
Prefix: `adm1032'
|
||||
Addresses scanned: I2C 0x4c
|
||||
@@ -32,6 +42,9 @@ Module Parameters
|
||||
* force_adm1032: short array (min = 1, max = 48)
|
||||
List of adapter,address pairs which are unquestionably assumed to contain
|
||||
a `adm1032' chip
|
||||
* force_lm99: short array (min = 1, max = 48)
|
||||
List of adapter,address pairs which are unquestionably assumed to contain
|
||||
a `lm99' chip
|
||||
* probe: short array (min = 1, max = 48)
|
||||
List of adapter,address pairs to scan additionally
|
||||
* probe_range: short array (min = 1, max = 48)
|
||||
@@ -47,15 +60,15 @@ Description
|
||||
|
||||
The LM90 is a digital temperature sensor. It senses its own temperature as
|
||||
well as the temperature of up to one external diode. It is compatible
|
||||
with many other devices such as the LM86, the LM89, the ADM1032, the
|
||||
MAX6657 and the MAX6658. Of these, only the ADM1032 is officially
|
||||
supported for now, but the others can probably be successfully forced.
|
||||
with many other devices such as the LM86, the LM89, the LM99, the ADM1032,
|
||||
the MAX6657 and the MAX6658. Of these, only the ADM1032, LM89 and LM99 are
|
||||
supported for now, but the others can be forced (and later added).
|
||||
|
||||
The specificity of this family of chipsets over the ADM1021/LM84
|
||||
family is that it features critical limits with hysteresis, and an
|
||||
increased resolution of the remote temperature measurement.
|
||||
|
||||
The different chipsets of the family are not stricly identical, although
|
||||
The different chipsets of the family are not strictly identical, although
|
||||
very similar. This driver doesn't handle any specific feature for now,
|
||||
but could if there ever was a need for it. For reference, here comes a
|
||||
non-exhaustive list of specific features:
|
||||
@@ -64,6 +77,14 @@ LM90:
|
||||
* Filter and alert configuration register at 0xBF.
|
||||
* ALERT is triggered by temperatures over critical limits.
|
||||
|
||||
LM89:
|
||||
* Same as LM90
|
||||
* Better external channel accuracy
|
||||
|
||||
LM99:
|
||||
* Same as LM89
|
||||
* External temperature shifted by 16 degrees down
|
||||
|
||||
ADM1032:
|
||||
* Consecutive alert register at 0x22.
|
||||
* Conversion averaging.
|
||||
@@ -72,9 +93,7 @@ ADM1032:
|
||||
|
||||
All temperature values are given in degrees Celcius. Resolution
|
||||
is 1.0 degree for the local temperature, 0.125 degree for the remote
|
||||
temperature. According to the datasheets, the ADM1032 has a better
|
||||
range and accuracy than the LM90 (but is also way more expensive).
|
||||
See the datasheets for details.
|
||||
temperature.
|
||||
|
||||
Each sensor has its own high and low limits, plus a critical limit.
|
||||
Additionally, there is a relative hysteresis value common to both critical
|
||||
@@ -91,7 +110,7 @@ other second; reading them more often will do no harm, but will return
|
||||
Chip Features
|
||||
-------------
|
||||
|
||||
Chip 'lm90'
|
||||
Chips 'lm90', adm1032' and 'lm99'
|
||||
|
||||
LABEL LABEL CLASS COMPUTE CLASS MODE MAGN
|
||||
temp1 - - R- 0
|
||||
@@ -102,36 +121,8 @@ temp2_high temp2 temp2 RW 1
|
||||
temp2_low temp2 temp2 RW 1
|
||||
tcrit1 temp1 temp1 RW 0
|
||||
tcrit2 temp2 temp2 RW 0
|
||||
hyst1 tcrit1 tcrit1 RW 0
|
||||
hyst2 tcrit2 tcrit2 R- 0
|
||||
alarms - - R- 0
|
||||
|
||||
LABEL FEATURE SYMBOL SYSCTL FILE:N
|
||||
temp1 SENSORS_LM90_LOCAL_TEMP temp1:3
|
||||
temp1_high SENSORS_LM90_LOCAL_HIGH temp1:1
|
||||
temp1_low SENSORS_LM90_LOCAL_LOW temp1:2
|
||||
temp2 SENSORS_LM90_REMOTE_TEMP temp2:3
|
||||
temp2_high SENSORS_LM90_REMOTE_HIGH temp2:1
|
||||
temp2_low SENSORS_LM90_REMOTE_LOW temp2:2
|
||||
tcrit1 SENSORS_LM90_LOCAL_TCRIT tcrit1:1
|
||||
tcrit2 SENSORS_LM90_REMOTE_TCRIT tcrit2:1
|
||||
hyst1 SENSORS_LM90_LOCAL_TCRIT_HYST hyst1:1
|
||||
hyst2 SENSORS_LM90_REMOTE_TCRIT_HYST hyst2:1
|
||||
alarms SENSORS_LM90_ALARMS alarms:1
|
||||
|
||||
Chip 'adm1032'
|
||||
|
||||
LABEL LABEL CLASS COMPUTE CLASS MODE MAGN
|
||||
temp1 - - R- 0
|
||||
temp1_high temp1 temp1 RW 0
|
||||
temp1_low temp1 temp1 RW 0
|
||||
temp2 - - R- 1
|
||||
temp2_high temp2 temp2 RW 1
|
||||
temp2_low temp2 temp2 RW 1
|
||||
tcrit1 temp1 temp1 RW 0
|
||||
tcrit2 temp2 temp2 RW 0
|
||||
hyst1 tcrit1 tcrit1 RW 0
|
||||
hyst2 tcrit2 tcrit2 R- 0
|
||||
hyst1 temp1 temp1 RW 0
|
||||
hyst2 temp2 temp2 R- 0
|
||||
alarms - - R- 0
|
||||
|
||||
LABEL FEATURE SYMBOL SYSCTL FILE:N
|
||||
|
||||
+40
-10
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* lm90.c - Part of lm_sensors, Linux kernel modules for hardware
|
||||
* monitoring
|
||||
* Copyright (C) 2003 Jean Delvare <khali@linux-fr.org>
|
||||
* Copyright (C) 2003-2004 Jean Delvare <khali@linux-fr.org>
|
||||
*
|
||||
* Based on the lm83 driver. The LM90 is a sensor chip made by National
|
||||
* Semiconductor. It reports up to two temperatures (its own plus up to
|
||||
@@ -10,6 +10,17 @@
|
||||
* obtained from National's website at:
|
||||
* http://www.national.com/pf/LM/LM90.html
|
||||
*
|
||||
* This driver also supports the LM89 and LM99, two other sensor chips
|
||||
* made by National Semiconductor. Both have an increased remote
|
||||
* temperature measurement accuracy (1 degree), and the LM99
|
||||
* additionally shifts remote temperatures (measured and limits) by 16
|
||||
* degrees, which allows for higher temperatures measurement. The
|
||||
* driver doesn't handle it since it can be done easily in user-space.
|
||||
* Complete datasheets can be obtained from National's website at:
|
||||
* http://www.national.com/pf/LM/LM89.html
|
||||
* http://www.national.com/pf/LM/LM99.html
|
||||
* Note that there is no way to differenciate between both chips.
|
||||
*
|
||||
* This driver also supports the ADM1032, a sensor chip made by Analog
|
||||
* Devices. That chip is similar to the LM90, with a few differences
|
||||
* that are not handled by this driver. Complete datasheet can be
|
||||
@@ -49,9 +60,11 @@
|
||||
/*
|
||||
* Addresses to scan
|
||||
* Address is fully defined internally and cannot be changed.
|
||||
* LM89, LM90, LM99 and ADM1032 have address 0x4c.
|
||||
* LM89-1, and LM99-1 have address 0x4d.
|
||||
*/
|
||||
|
||||
static unsigned short normal_i2c[] = { 0x4c, SENSORS_I2C_END };
|
||||
static unsigned short normal_i2c[] = { 0x4c, 0x4d, SENSORS_I2C_END };
|
||||
static unsigned short normal_i2c_range[] = { SENSORS_I2C_END };
|
||||
static unsigned int normal_isa[] = { SENSORS_ISA_END };
|
||||
static unsigned int normal_isa_range[] = { SENSORS_ISA_END };
|
||||
@@ -60,7 +73,7 @@ static unsigned int normal_isa_range[] = { SENSORS_ISA_END };
|
||||
* Insmod parameters
|
||||
*/
|
||||
|
||||
SENSORS_INSMOD_2(lm90, adm1032);
|
||||
SENSORS_INSMOD_3(lm90, adm1032, lm99);
|
||||
|
||||
/*
|
||||
* The LM90 registers
|
||||
@@ -325,18 +338,30 @@ static int lm90_detect(struct i2c_adapter *adapter, int address,
|
||||
|
||||
if (man_id == 0x01) /* National Semiconductor */
|
||||
{
|
||||
if (chip_id >= 0x21 && chip_id < 0x30 /* LM90 */
|
||||
&& (kind == 0 /* skip detection */
|
||||
|| ((i2c_smbus_read_byte_data(new_client,
|
||||
LM90_REG_R_CONFIG2) & 0xF8) == 0x00
|
||||
&& reg_convrate <= 0x09)))
|
||||
u8 reg_config2;
|
||||
|
||||
reg_config2 = i2c_smbus_read_byte_data(new_client,
|
||||
LM90_REG_R_CONFIG2);
|
||||
|
||||
if (kind == 0 /* skip detection */
|
||||
|| ((reg_config2 & 0xF8) == 0x00
|
||||
&& reg_convrate <= 0x09))
|
||||
{
|
||||
kind = lm90;
|
||||
if (address == 0x4C
|
||||
&& (chip_id & 0xF0) == 0x20) /* LM90 */
|
||||
{
|
||||
kind = lm90;
|
||||
}
|
||||
else if ((chip_id & 0xF0) == 0x30) /* LM89/LM99 */
|
||||
{
|
||||
kind = lm99;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (man_id == 0x41) /* Analog Devices */
|
||||
{
|
||||
if ((chip_id & 0xF0) == 0x40 /* ADM1032 */
|
||||
if (address == 0x4C
|
||||
&& (chip_id & 0xF0) == 0x40 /* ADM1032 */
|
||||
&& (kind == 0 /* skip detection */
|
||||
|| (reg_config1 & 0x3F) == 0x00))
|
||||
{
|
||||
@@ -361,6 +386,11 @@ static int lm90_detect(struct i2c_adapter *adapter, int address,
|
||||
type_name = "adm1032";
|
||||
client_name = "ADM1032 chip";
|
||||
}
|
||||
else if (kind == lm99)
|
||||
{
|
||||
type_name = "lm99";
|
||||
client_name = "LM99 chip";
|
||||
}
|
||||
else
|
||||
{
|
||||
printk("lm90.o: Unknown kind %d.\n", kind);
|
||||
|
||||
+3
-2
@@ -728,10 +728,10 @@ static sensors_chip_feature lm90_features[] =
|
||||
SENSORS_LM90_REMOTE_TEMP, SENSORS_LM90_REMOTE_TEMP,
|
||||
RW, LM90_SYSCTL_REMOTE_TCRIT, VALUE(1), 0, "temp2_crit", 3 },
|
||||
{ SENSORS_LM90_LOCAL_TCRIT_HYST, "hyst1",
|
||||
SENSORS_LM90_LOCAL_TCRIT, SENSORS_LM90_LOCAL_TCRIT,
|
||||
SENSORS_LM90_LOCAL_TEMP, SENSORS_LM90_LOCAL_TEMP,
|
||||
RW, LM90_SYSCTL_LOCAL_HYST, VALUE(1), 0, "temp1_crit_hyst", 3 },
|
||||
{ SENSORS_LM90_REMOTE_TCRIT_HYST, "hyst2",
|
||||
SENSORS_LM90_REMOTE_TCRIT, SENSORS_LM90_REMOTE_TCRIT,
|
||||
SENSORS_LM90_REMOTE_TEMP, SENSORS_LM90_REMOTE_TEMP,
|
||||
R, LM90_SYSCTL_REMOTE_HYST, VALUE(1), 0, "temp2_crit_hyst", 3 },
|
||||
{ SENSORS_LM90_ALARMS, "alarms",
|
||||
NOMAP, NOMAP,
|
||||
@@ -5031,6 +5031,7 @@ sensors_chip_features sensors_chip_features_list[] =
|
||||
{ SENSORS_LM83_PREFIX, lm83_features },
|
||||
{ SENSORS_LM90_PREFIX, lm90_features },
|
||||
{ SENSORS_ADM1032_PREFIX, lm90_features },
|
||||
{ SENSORS_LM99_PREFIX, lm90_features },
|
||||
{ SENSORS_XEONTEMP_PREFIX, xeontemp_features },
|
||||
{ SENSORS_MAX6650_PREFIX, max6650_features },
|
||||
{ 0 }
|
||||
|
||||
+2
-1
@@ -443,10 +443,11 @@
|
||||
#define SENSORS_LM85_ZONE3_RANGE 100 /* RW -- zone3_range */
|
||||
#define SENSORS_LM85_ZONE3_SMOOTH 101 /* RW -- zone3_smooth */
|
||||
|
||||
/* LM90/ADM1032 chips */
|
||||
/* LM89/LM90/LM99/ADM1032 chips */
|
||||
|
||||
#define SENSORS_LM90_PREFIX "lm90"
|
||||
#define SENSORS_ADM1032_PREFIX "adm1032"
|
||||
#define SENSORS_LM99_PREFIX "lm99"
|
||||
|
||||
#define SENSORS_LM90_LOCAL_TEMP 51 /* R */
|
||||
#define SENSORS_LM90_LOCAL_HIGH 52 /* RW */
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ if [ "$CONFIG_I2C_PROC" = "m" -o "$CONFIG_I2C_PROC" = "y" ] ; then
|
||||
dep_tristate ' National Semiconductor LM83' CONFIG_SENSORS_LM83 $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 LM90, Analog Devices ADM1032' CONFIG_SENSORS_LM90 $CONFIG_I2C $CONFIG_I2C_PROC
|
||||
dep_tristate ' National Semiconductor LM90 and compatibles' CONFIG_SENSORS_LM90 $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 ' SMSC47M1xx Integrated Sensors' CONFIG_SENSORS_SMSC47M1 $CONFIG_I2C $CONFIG_I2C_PROC $CONFIG_I2C_ISA
|
||||
|
||||
+2
-2
@@ -488,8 +488,8 @@ CONFIG_SENSORS_LM87
|
||||
National Semiconductor LM90
|
||||
CONFIG_SENSORS_LM90
|
||||
If you say yes here you get support for the National Semiconductor
|
||||
LM90 and Analog Devices ADM1032 sensor chips. This can also be
|
||||
built as a module.
|
||||
LM90, LM89 and LM99, and Analog Devices ADM1032 sensor chips. This
|
||||
can also be built as a module.
|
||||
|
||||
You will also need the latest user-space utilities: you can find
|
||||
them in the lm_sensors package, which you can download at
|
||||
|
||||
@@ -422,6 +422,7 @@ struct match matches[] = {
|
||||
{ "lm83", print_lm83 },
|
||||
{ "lm90", print_lm90 },
|
||||
{ "adm1032", print_lm90 },
|
||||
{ "lm99", print_lm90 },
|
||||
{ "xeontemp", print_xeontemp },
|
||||
{ "max6650", print_max6650 },
|
||||
{ "asb100", print_asb100 },
|
||||
|
||||
Reference in new issue
Block a user