mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-02 15:25:38 +00:00
Add support for the ADM1032.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2039 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
Kernel driver `lm90.o'
|
Kernel driver `lm90.o'
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
Status: Complete but untested
|
Status: Complete and reasonably tested
|
||||||
|
|
||||||
Supported chips:
|
Supported chips:
|
||||||
* National Semiconductor LM90
|
* National Semiconductor LM90
|
||||||
@@ -9,6 +9,11 @@ Supported chips:
|
|||||||
Addresses scanned: I2C 0x4c
|
Addresses scanned: I2C 0x4c
|
||||||
Datasheet: Publicly available at the National Semiconductor website
|
Datasheet: Publicly available at the National Semiconductor website
|
||||||
http://www.national.com/pf/LM/LM90.html
|
http://www.national.com/pf/LM/LM90.html
|
||||||
|
* Analog Devices ADM1032
|
||||||
|
Prefix: `adm1032'
|
||||||
|
Addresses scanned: I2C 0x4c
|
||||||
|
Datasheet: Publicly available at the Analog Devices website
|
||||||
|
http://products.analog.com/products/info.asp?product=ADM1032
|
||||||
|
|
||||||
|
|
||||||
Author: Jean Delvare <khali@linux-fr.org>
|
Author: Jean Delvare <khali@linux-fr.org>
|
||||||
@@ -24,6 +29,9 @@ Module Parameters
|
|||||||
* force_lm90: short array (min = 1, max = 48)
|
* force_lm90: short array (min = 1, max = 48)
|
||||||
List of adapter,address pairs which are unquestionably assumed to contain
|
List of adapter,address pairs which are unquestionably assumed to contain
|
||||||
a `lm90' chip
|
a `lm90' chip
|
||||||
|
* force_adm1032: short array (min = 1, max = 48)
|
||||||
|
List of adapter,address pairs which are unquestionably assumed to contain
|
||||||
|
a `adm1032' chip
|
||||||
* probe: short array (min = 1, max = 48)
|
* probe: short array (min = 1, max = 48)
|
||||||
List of adapter,address pairs to scan additionally
|
List of adapter,address pairs to scan additionally
|
||||||
* probe_range: short array (min = 1, max = 48)
|
* probe_range: short array (min = 1, max = 48)
|
||||||
@@ -40,30 +48,33 @@ Description
|
|||||||
The LM90 is a digital temperature sensor. It senses its own temperature as
|
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
|
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
|
with many other devices such as the LM86, the LM89, the ADM1032, the
|
||||||
MAX6657 and the MAX6658. The particularity of the LM90 over the LM84 for
|
MAX6657 and the MAX6658. Of these, only the ADM1032 is officially
|
||||||
example is that it features critical limits with hysteresis, and an
|
supported for now, but the others can probably be successfully forced.
|
||||||
|
|
||||||
|
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.
|
increased resolution of the remote temperature measurement.
|
||||||
|
|
||||||
Using the adm1021 or lm83 drivers for a LM90 should work, but the extra
|
The different chipsets of the family are not stricly identical, although
|
||||||
features won't be supported.
|
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:
|
||||||
|
|
||||||
The LM90 is found on many motherboards, too many for an exhaustive listing.
|
LM90:
|
||||||
A list of confirmed motherboards follows. If you think the list is wrong or
|
* Filter and alert configuration register at 0xBF.
|
||||||
want to add a specific motherboard to it, contact us.
|
* ALERT is triggered by temperatures over critical limits.
|
||||||
|
|
||||||
Confirmed motherboards:
|
ADM1032:
|
||||||
Gigabyte GA-7VAX
|
* Consecutive alert register at 0x22.
|
||||||
Gigabyte GA-7VRXP
|
* Conversion averaging.
|
||||||
|
* Up to 64 conversions/s.
|
||||||
|
* ALERT is triggered by open remote sensor.
|
||||||
|
|
||||||
The driver is untested so far. We want testers! Let us know if you want to
|
All temperature values are given in degrees Celcius. Resolution
|
||||||
help.
|
|
||||||
|
|
||||||
All temperature values are given in degrees Celcius. Local and remote
|
|
||||||
temperatures are given within a range of +25 to +125 degrees. Resolution
|
|
||||||
is 1.0 degree for the local temperature, 0.125 degree for the remote
|
is 1.0 degree for the local temperature, 0.125 degree for the remote
|
||||||
temperature. Accuracy is guaranteed to 4.0 degrees, but should reach
|
temperature. According to the datasheets, the ADM1032 has a better
|
||||||
1.5 degree (local) and 3.0 degrees (remote) under typical conditions (see
|
range and accuracy than the LM90 (but is also way more expensive).
|
||||||
the datasheet for more details).
|
See the datasheets for details.
|
||||||
|
|
||||||
Each sensor has its own high and low limits, plus a critical limit.
|
Each sensor has its own high and low limits, plus a critical limit.
|
||||||
Additionally, there is a relative hysteresis value common to both critical
|
Additionally, there is a relative hysteresis value common to both critical
|
||||||
@@ -102,3 +113,29 @@ tcrit1 SENSORS_LM90_LOCAL_TCRIT tcrit1:1
|
|||||||
tcrit2 SENSORS_LM90_REMOTE_TCRIT tcrit2:1
|
tcrit2 SENSORS_LM90_REMOTE_TCRIT tcrit2:1
|
||||||
hyst SENSORS_LM90_TCRIT_HYST hyst:1
|
hyst SENSORS_LM90_TCRIT_HYST hyst:1
|
||||||
alarms SENSORS_LM90_ALARMS alarms: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
|
||||||
|
hyst - - RW 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
|
||||||
|
hyst SENSORS_LM90_TCRIT_HYST hyst:1
|
||||||
|
alarms SENSORS_LM90_ALARMS alarms:1
|
||||||
|
@@ -1521,10 +1521,12 @@ chip "lm83-*"
|
|||||||
# should be higher than each of the high limits above
|
# should be higher than each of the high limits above
|
||||||
# set tcrit 85
|
# set tcrit 85
|
||||||
|
|
||||||
chip "lm90-*"
|
chip "lm90-*" "adm1032-*"
|
||||||
|
|
||||||
label temp1 "M/B Temp"
|
label temp1 "M/B Temp"
|
||||||
label temp2 "CPU Temp"
|
label temp2 "CPU Temp"
|
||||||
|
label tcrit1 "M/B Crit"
|
||||||
|
label tcrit2 "CPU Crit"
|
||||||
|
|
||||||
# change high and low limits to fit your needs
|
# change high and low limits to fit your needs
|
||||||
# set temp1_low 10
|
# set temp1_low 10
|
||||||
|
@@ -10,6 +10,16 @@
|
|||||||
* obtained from National's website at:
|
* obtained from National's website at:
|
||||||
* http://www.national.com/pf/LM/LM90.html
|
* http://www.national.com/pf/LM/LM90.html
|
||||||
*
|
*
|
||||||
|
* 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
|
||||||
|
* obtained from Analog's website at:
|
||||||
|
* http://products.analog.com/products/info.asp?product=ADM1032
|
||||||
|
*
|
||||||
|
* Since the LM90 was the first chipset supported by this driver, most
|
||||||
|
* comments will refer to this chipset, but are actually general and
|
||||||
|
* concern all supported chipsets, unless mentioned otherwise.
|
||||||
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
@@ -46,11 +56,10 @@ static unsigned int normal_isa_range[] = { SENSORS_ISA_END };
|
|||||||
* Insmod parameters
|
* Insmod parameters
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SENSORS_INSMOD_1(lm90);
|
SENSORS_INSMOD_2(lm90, adm1032);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The LM90 registers
|
* The LM90 registers
|
||||||
* Manufacturer ID is 0x01 for National Semiconductor.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LM90_REG_R_MAN_ID 0xFE
|
#define LM90_REG_R_MAN_ID 0xFE
|
||||||
@@ -137,7 +146,7 @@ static void lm90_alarms(struct i2c_client *client, int operation,
|
|||||||
|
|
||||||
static struct i2c_driver lm90_driver = {
|
static struct i2c_driver lm90_driver = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.name = "LM90 sensor driver",
|
.name = "LM90/ADM1032 sensor driver",
|
||||||
.id = I2C_DRIVERID_LM90,
|
.id = I2C_DRIVERID_LM90,
|
||||||
.flags = I2C_DF_NOTIFY,
|
.flags = I2C_DF_NOTIFY,
|
||||||
.attach_adapter = lm90_attach_adapter,
|
.attach_adapter = lm90_attach_adapter,
|
||||||
@@ -234,6 +243,7 @@ static int lm90_detect(struct i2c_adapter *adapter, int address,
|
|||||||
int err = 0;
|
int err = 0;
|
||||||
const char *type_name = "";
|
const char *type_name = "";
|
||||||
const char *client_name = "";
|
const char *client_name = "";
|
||||||
|
u8 reg_config1, reg_convrate;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (i2c_is_isa_adapter(adapter))
|
if (i2c_is_isa_adapter(adapter))
|
||||||
@@ -274,8 +284,7 @@ static int lm90_detect(struct i2c_adapter *adapter, int address,
|
|||||||
/*
|
/*
|
||||||
* Now we do the remaining detection. A negative kind means that
|
* Now we do the remaining detection. A negative kind means that
|
||||||
* the driver was loaded with no force parameter (default), so we
|
* the driver was loaded with no force parameter (default), so we
|
||||||
* must both detect and identify the chip (actually there is only
|
* must both detect and identify the chip. A zero kind means that
|
||||||
* one possible kind of chip for now, LM90). A zero kind means that
|
|
||||||
* the driver was loaded with the force parameter, the detection
|
* the driver was loaded with the force parameter, the detection
|
||||||
* step shall be skipped. A positive kind means that the driver
|
* step shall be skipped. A positive kind means that the driver
|
||||||
* was loaded with the force parameter and a given kind of chip is
|
* was loaded with the force parameter and a given kind of chip is
|
||||||
@@ -283,17 +292,17 @@ static int lm90_detect(struct i2c_adapter *adapter, int address,
|
|||||||
* are skipped.
|
* are skipped.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
reg_config1 = i2c_smbus_read_byte_data(new_client,
|
||||||
|
LM90_REG_R_CONFIG1);
|
||||||
|
reg_convrate = i2c_smbus_read_byte_data(new_client,
|
||||||
|
LM90_REG_R_CONVRATE);
|
||||||
if (kind < 0) /* detection */
|
if (kind < 0) /* detection */
|
||||||
{
|
{
|
||||||
if (((i2c_smbus_read_byte_data(new_client, LM90_REG_R_CONFIG1)
|
if ((reg_config1 & 0x2A) != 0x00
|
||||||
& 0x2A) != 0x00)
|
|| reg_convrate > 0x0A)
|
||||||
|| (i2c_smbus_read_byte_data(new_client, LM90_REG_R_CONVRATE)
|
|
||||||
> 9)
|
|
||||||
|| ((i2c_smbus_read_byte_data(new_client, LM90_REG_R_CONFIG2)
|
|
||||||
& 0xF8) != 0x00))
|
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printk("lm90.o: LM90 detection failed at 0x%02x.\n",
|
printk("lm90.o: Detection failed at 0x%02x.\n",
|
||||||
address);
|
address);
|
||||||
#endif
|
#endif
|
||||||
goto ERROR1;
|
goto ERROR1;
|
||||||
@@ -308,9 +317,18 @@ static int lm90_detect(struct i2c_adapter *adapter, int address,
|
|||||||
chip_id = i2c_smbus_read_byte_data(new_client, LM90_REG_R_CHIP_ID);
|
chip_id = i2c_smbus_read_byte_data(new_client, LM90_REG_R_CHIP_ID);
|
||||||
if (man_id == 0x01) /* National Semiconductor */
|
if (man_id == 0x01) /* National Semiconductor */
|
||||||
{
|
{
|
||||||
if (chip_id >= 0x21 && chip_id < 0x30)
|
if (chip_id >= 0x21 && chip_id < 0x30 /* LM90 */
|
||||||
|
&& i2c_smbus_read_byte_data(new_client,
|
||||||
|
LM90_REG_R_CONFIG2 & 0xF8) == 0x00
|
||||||
|
&& reg_convrate <= 0x09)
|
||||||
kind = lm90;
|
kind = lm90;
|
||||||
}
|
}
|
||||||
|
else if (man_id == 0x41) /* Analog Devices */
|
||||||
|
{
|
||||||
|
if ((chip_id & 0xF0) == 0x40 /* ADM1032 */
|
||||||
|
&& (reg_config1 & 0x3F) == 0x00)
|
||||||
|
kind = adm1032;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kind <= 0) /* identification failed */
|
if (kind <= 0) /* identification failed */
|
||||||
@@ -324,6 +342,11 @@ static int lm90_detect(struct i2c_adapter *adapter, int address,
|
|||||||
type_name = "lm90";
|
type_name = "lm90";
|
||||||
client_name = "LM90 chip";
|
client_name = "LM90 chip";
|
||||||
}
|
}
|
||||||
|
else if (kind == adm1032)
|
||||||
|
{
|
||||||
|
type_name = "adm1032";
|
||||||
|
client_name = "ADM1032 chip";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printk("lm90.o: Unknown kind %d.\n", kind);
|
printk("lm90.o: Unknown kind %d.\n", kind);
|
||||||
@@ -447,7 +470,7 @@ static void lm90_update_client(struct i2c_client *client)
|
|||||||
{
|
{
|
||||||
u8 oldh, newh;
|
u8 oldh, newh;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printk("lm90.o: Updating LM90 data.\n");
|
printk("lm90.o: Updating data.\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
data->local_temp =
|
data->local_temp =
|
||||||
@@ -680,7 +703,7 @@ static void __exit sm_lm90_exit(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
MODULE_AUTHOR("Jean Delvare <khali@linux-fr.org>");
|
MODULE_AUTHOR("Jean Delvare <khali@linux-fr.org>");
|
||||||
MODULE_DESCRIPTION("LM90 sensor driver");
|
MODULE_DESCRIPTION("LM90/ADM1032 sensor driver");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
module_init(sm_lm90_init);
|
module_init(sm_lm90_init);
|
||||||
|
@@ -4821,6 +4821,7 @@ sensors_chip_features sensors_chip_features_list[] =
|
|||||||
{ SENSORS_ADT7463_PREFIX, adm1027_features },
|
{ SENSORS_ADT7463_PREFIX, adm1027_features },
|
||||||
{ SENSORS_LM83_PREFIX, lm83_features },
|
{ SENSORS_LM83_PREFIX, lm83_features },
|
||||||
{ SENSORS_LM90_PREFIX, lm90_features },
|
{ SENSORS_LM90_PREFIX, lm90_features },
|
||||||
|
{ SENSORS_ADM1032_PREFIX, lm90_features },
|
||||||
{ SENSORS_XEONTEMP_PREFIX, xeontemp_features },
|
{ SENSORS_XEONTEMP_PREFIX, xeontemp_features },
|
||||||
{ SENSORS_MAX6650_PREFIX, max6650_features },
|
{ SENSORS_MAX6650_PREFIX, max6650_features },
|
||||||
{ 0 }
|
{ 0 }
|
||||||
|
@@ -443,9 +443,10 @@
|
|||||||
#define SENSORS_LM85_ZONE3_RANGE 100 /* RW -- zone3_range */
|
#define SENSORS_LM85_ZONE3_RANGE 100 /* RW -- zone3_range */
|
||||||
#define SENSORS_LM85_ZONE3_SMOOTH 101 /* RW -- zone3_smooth */
|
#define SENSORS_LM85_ZONE3_SMOOTH 101 /* RW -- zone3_smooth */
|
||||||
|
|
||||||
/* LM90 chips */
|
/* LM90/ADM1032 chips */
|
||||||
|
|
||||||
#define SENSORS_LM90_PREFIX "lm90"
|
#define SENSORS_LM90_PREFIX "lm90"
|
||||||
|
#define SENSORS_ADM1032_PREFIX "adm1032"
|
||||||
|
|
||||||
#define SENSORS_LM90_LOCAL_TEMP 51 /* R */
|
#define SENSORS_LM90_LOCAL_TEMP 51 /* R */
|
||||||
#define SENSORS_LM90_LOCAL_HIGH 52 /* RW */
|
#define SENSORS_LM90_LOCAL_HIGH 52 /* RW */
|
||||||
|
@@ -1131,7 +1131,7 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "Analog Devices ADM1032",
|
name => "Analog Devices ADM1032",
|
||||||
driver => "to-be-written",
|
driver => "lm90",
|
||||||
i2c_addrs => [0x4c],
|
i2c_addrs => [0x4c],
|
||||||
i2c_detect => sub { lm90_detect 3, @_ },
|
i2c_detect => sub { lm90_detect 3, @_ },
|
||||||
},
|
},
|
||||||
|
@@ -379,7 +379,8 @@ void do_a_print(sensors_chip_name name)
|
|||||||
print_adm1026(&name);
|
print_adm1026(&name);
|
||||||
else if (!strcmp(name.prefix,"lm83"))
|
else if (!strcmp(name.prefix,"lm83"))
|
||||||
print_lm83(&name);
|
print_lm83(&name);
|
||||||
else if (!strcmp(name.prefix,"lm90"))
|
else if (!strcmp(name.prefix,"lm90")
|
||||||
|
|| !strcmp(name.prefix,"adm1032"))
|
||||||
print_lm90(&name);
|
print_lm90(&name);
|
||||||
else if (!strcmp(name.prefix,"xeontemp"))
|
else if (!strcmp(name.prefix,"xeontemp"))
|
||||||
print_xeontemp(&name);
|
print_xeontemp(&name);
|
||||||
|
Reference in New Issue
Block a user