mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-09 16:21:51 +00:00
lm83: Add LM82 support (2.6 backport)
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4048 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
b78bf75922
commit
c7ce94770a
7 files changed
+47
-11
No files matched your search
@@ -17,6 +17,7 @@ lm_sensors CHANGES file
|
||||
Add ICH8 support (2.6 backport)
|
||||
Module i2c-piix4: Add ServerWorks HT-1000 support (2.6 backport)
|
||||
Module i2c-viapro: Fix compilation with kernels < 2.4.21
|
||||
Module lm83: Add LM82 support (2.6 backport)
|
||||
Module w83781d: Use real-time alarm registers when possible (2.6 backport)
|
||||
Module w83792d: Fix PWM range (2.6 backport)
|
||||
Program decode-dimms.pl: Decode depending on the memory type
|
||||
|
||||
@@ -88,7 +88,7 @@ At least the following hardware sensor chips are supported:
|
||||
Microchip TC1068, TCM1617, TCN75
|
||||
Myson MTP008
|
||||
National Semiconductor LM63, LM75, LM76, LM78, LM78-J, LM79,
|
||||
LM80, LM81, LM83, LM84, LM85, LM86, LM87,
|
||||
LM80, LM81, LM82, LM83, LM84, LM85, LM86, LM87,
|
||||
LM89, LM90, LM92, LM93, LM99, PC87360,
|
||||
PC87363, PC87364, PC87365, PC87366
|
||||
Philips NE1617, NE1617A, NE1619
|
||||
|
||||
@@ -144,6 +144,7 @@ lm80
|
||||
|
||||
lm83
|
||||
lm83 4 - - - yes no
|
||||
lm82 2 - - - yes no
|
||||
|
||||
lm85
|
||||
lm85 3 5 4 3 pwm yes no
|
||||
|
||||
+12
-4
@@ -9,6 +9,10 @@ Supported chips:
|
||||
Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
|
||||
Datasheet: Publicly available at the National Semiconductor website
|
||||
http://www.national.com/pf/LM/LM83.html
|
||||
* National Semiconductor LM82
|
||||
Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
|
||||
Datasheet: Publicly available at the National Semiconductor website
|
||||
http://www.national.com/pf/LM/LM82.html
|
||||
|
||||
|
||||
Author: Jean Delvare <khali@linux-fr.org>
|
||||
@@ -38,10 +42,11 @@ Description
|
||||
-----------
|
||||
|
||||
The LM83 is a digital temperature sensor. It senses its own temperature as
|
||||
well as the temperature of up to three external diodes. It is compatible
|
||||
with many other devices such as the LM84 and all other ADM1021 clones.
|
||||
The main difference between the LM83 and the LM84 in that the later can
|
||||
only sense the temperature of one external diode.
|
||||
well as the temperature of up to three external diodes. The LM82 is
|
||||
a stripped down version of the LM83 that only supports one external diode.
|
||||
Both are compatible with many other devices such as the LM84 and all
|
||||
other ADM1021 clones. The main difference between the LM83 and the LM84
|
||||
in that the later can only sense the temperature of one external diode.
|
||||
|
||||
Using the adm1021 driver for a LM83 should work, but only two temperatures
|
||||
will be reported instead of four.
|
||||
@@ -59,6 +64,9 @@ Unconfirmed motherboards:
|
||||
Iwill MPX2
|
||||
Soltek SL-75DRV5
|
||||
|
||||
The LM82 is confirmed to have been found on most AMD Geode reference
|
||||
designs and test platforms.
|
||||
|
||||
The driver has been successfully tested by Magnus Forsström, who I'd
|
||||
like to thank here. More testers will be of course welcome.
|
||||
|
||||
|
||||
+29
-3
@@ -12,6 +12,10 @@
|
||||
* Since the datasheet omits to give the chip stepping code, I give it
|
||||
* here: 0x03 (at register 0xff).
|
||||
*
|
||||
* Also supports the LM82 temp sensor, which is basically a stripped down
|
||||
* model of the LM83. Datasheet is here:
|
||||
* http://www.national.com/pf/LM/LM82.html
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
@@ -50,7 +54,7 @@ static unsigned int normal_isa_range[] = { SENSORS_ISA_END };
|
||||
* Insmod parameters
|
||||
*/
|
||||
|
||||
SENSORS_INSMOD_1(lm83);
|
||||
SENSORS_INSMOD_2(lm83, lm82);
|
||||
|
||||
/*
|
||||
* The LM83 registers
|
||||
@@ -200,6 +204,19 @@ static ctl_table lm83_dir_table_template[] =
|
||||
{0}
|
||||
};
|
||||
|
||||
static ctl_table lm82_dir_table_template[] =
|
||||
{
|
||||
{LM83_SYSCTL_LOCAL_TEMP, "temp1", NULL, 0, 0644, NULL,
|
||||
&i2c_proc_real, &i2c_sysctl_real, NULL, &lm83_temp},
|
||||
{LM83_SYSCTL_REMOTE2_TEMP, "temp3", NULL, 0, 0644, NULL,
|
||||
&i2c_proc_real, &i2c_sysctl_real, NULL, &lm83_temp},
|
||||
{LM83_SYSCTL_TCRIT, "tcrit", NULL, 0, 0644, NULL,
|
||||
&i2c_proc_real, &i2c_sysctl_real, NULL, &lm83_tcrit},
|
||||
{LM83_SYSCTL_ALARMS, "alarms", NULL, 0, 0444, NULL,
|
||||
&i2c_proc_real, &i2c_sysctl_real, NULL, &lm83_alarms},
|
||||
{0}
|
||||
};
|
||||
|
||||
/*
|
||||
* Real code
|
||||
*/
|
||||
@@ -301,6 +318,8 @@ static int lm83_detect(struct i2c_adapter *adapter, int address, unsigned
|
||||
{
|
||||
if (chip_id == 0x03)
|
||||
kind = lm83;
|
||||
else if (chip_id == 0x01)
|
||||
kind = lm82;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -315,6 +334,11 @@ static int lm83_detect(struct i2c_adapter *adapter, int address, unsigned
|
||||
type_name = "lm83";
|
||||
client_name = "LM83 chip";
|
||||
}
|
||||
else if (kind == lm82)
|
||||
{
|
||||
type_name = "lm82";
|
||||
client_name = "LM82 chip";
|
||||
}
|
||||
else
|
||||
{
|
||||
printk("lm83.o: Unknown kind %d.\n", kind);
|
||||
@@ -346,8 +370,10 @@ static int lm83_detect(struct i2c_adapter *adapter, int address, unsigned
|
||||
* Register a new directory entry.
|
||||
*/
|
||||
|
||||
if ((err = i2c_register_entry(new_client, type_name,
|
||||
lm83_dir_table_template, THIS_MODULE)) < 0)
|
||||
if ((kind == lm83 && (err = i2c_register_entry(new_client, type_name,
|
||||
lm83_dir_table_template, THIS_MODULE)) < 0) ||
|
||||
(kind == lm82 && (err = i2c_register_entry(new_client, type_name,
|
||||
lm82_dir_table_template, THIS_MODULE)) < 0))
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printk("lm83.o: Failed registering directory entry.\n");
|
||||
|
||||
+1
-1
@@ -36,7 +36,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 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 LM83' CONFIG_SENSORS_LM83 $CONFIG_I2C $CONFIG_I2C_PROC
|
||||
dep_tristate ' National Semiconductor LM83 and compatibles' 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 and compatibles' CONFIG_SENSORS_LM90 $CONFIG_I2C $CONFIG_I2C_PROC
|
||||
|
||||
+2
-2
@@ -538,10 +538,10 @@ CONFIG_SENSORS_LM80
|
||||
in the lm_sensors package, which you can download at
|
||||
http://www.lm-sensors.nu/
|
||||
|
||||
National Semiconductor LM83
|
||||
National Semiconductor LM83 and compatibles
|
||||
CONFIG_SENSORS_LM83
|
||||
If you say yes here you get support for the National Semiconductor
|
||||
LM83 sensor chip. This can also be built as a module.
|
||||
LM82 and LM83 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
|
||||
|
||||
Reference in new issue
Block a user