mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 14:25:39 +00:00
(mds) add support for TI THMC10 to the adm1021 driver.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@533 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -25,7 +25,7 @@ problems.
|
||||
* Mark D. Studebaker <mds@eng.paradyne.com>
|
||||
Author of the i2c-ali15x3 bus driver and the i2c-i810 bus driver.
|
||||
Added w83782d, w83783s, and w83627hf support to the w83781d driver.
|
||||
Added max1617 support to the adm1021 driver.
|
||||
Added max1617 and thmc10 support to the adm1021 driver.
|
||||
Added lm81 support to the adm9240 driver.
|
||||
Author of the decode-xeon.pl xeon EEPROM decoder.
|
||||
* Geert Uytterhoeven <geert@linux-m68k.org>
|
||||
|
1
README
1
README
@@ -38,6 +38,7 @@ At least the following hardware sensor chips are supported:
|
||||
Dallas Semiconductor DS1780
|
||||
Hewlett Packard Maxilife (several revisions)
|
||||
Intel Xeon processor embedded sensors
|
||||
TI THMC10
|
||||
|
||||
We also support some miscellaneous chips:
|
||||
Linear Technologies LTC1710
|
||||
|
@@ -27,6 +27,7 @@ adm1021
|
||||
adm1021 2 - - - yes no
|
||||
max1617 2 - - - yes no
|
||||
max1617a 2 - - - yes no
|
||||
thmc10 2 - - - yes no
|
||||
xeon 1 - - - yes no
|
||||
|
||||
adm9240
|
||||
@@ -73,7 +74,7 @@ NON-SENSOR CHIPS
|
||||
----------------
|
||||
|
||||
Driver Chips
|
||||
-------------
|
||||
------ -----
|
||||
|
||||
bt869
|
||||
bt869 video modulator chip
|
||||
@@ -88,3 +89,5 @@ icspll
|
||||
ltc1710
|
||||
ltc1710 two switches only
|
||||
|
||||
matorb
|
||||
Matrox Orbital LCD displays
|
||||
|
@@ -1,7 +1,8 @@
|
||||
Kernel driver `adm1021.o'
|
||||
=========================
|
||||
|
||||
Status: Complete; tested for the ADM1021 and MAX1617, untested for the MAX1617A.
|
||||
Status: Complete; tested for the ADM1021 and MAX1617,
|
||||
untested for the MAX1617A and the THMC10.
|
||||
|
||||
Supported chips:
|
||||
* Analog Devices ADM1021
|
||||
@@ -16,6 +17,10 @@ Supported chips:
|
||||
Prefix `max1617a'
|
||||
Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e (inclusive)
|
||||
Datasheet: Publicly available at the Maxim website
|
||||
* TI THMC10
|
||||
Prefix `thmc10'
|
||||
Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e (inclusive)
|
||||
Datasheet: Publicly available at the TI website
|
||||
|
||||
|
||||
Author: Frodo Looijaard <frodol@dds.nl> and Philip Edelbrock
|
||||
@@ -52,6 +57,7 @@ Description
|
||||
The chips supported by this driver are very similar. The Maxim MAX1617
|
||||
is the oldest; it has the problem that it is not very well detectable.
|
||||
The MAX1617A solves that. The ADM1021 is a straight clone of the MAX1617A.
|
||||
Ditto for the THMC10.
|
||||
From here on, we will refer to all these chips as ADM1021-clones.
|
||||
|
||||
ADM1021-clones implement two temperature sensors. One of them is internal,
|
||||
@@ -102,6 +108,28 @@ Chip `adm1021'
|
||||
die_code SENSORS_ADM1021_DIE_CODE die_code:1
|
||||
|
||||
|
||||
Chip `thmc10'
|
||||
LABEL LABEL CLASS COMPUTE CLASS ACCESS MAGNITUDE
|
||||
temp NONE NONE R 0
|
||||
temp_low temp temp RW 0
|
||||
temp_over temp temp RW 0
|
||||
remote_temp NONE NONE R 0
|
||||
remote_temp_low remote_temp remote_temp RW 0
|
||||
remote_temp_over remote_temp remote_temp RW 0
|
||||
alarms NONE NONE R 0
|
||||
die_code NONE NONE R 0
|
||||
|
||||
LABEL FEATURE SYMBOL SYSCTL FILE:NR
|
||||
temp SENSORS_ADM1021_TEMP temp:3
|
||||
temp_low SENSORS_ADM1021_TEMP_HYST temp:2
|
||||
temp_over SENSORS_ADM1021_TEMP_OVER temp:1
|
||||
remote_temp SENSORS_ADM1021_REMOTE_TEMP remote_temp:3
|
||||
remote_temp_low SENSORS_ADM1021_REMOTE_TEMP_HYST remote_temp:2
|
||||
remote_temp_over SENSORS_ADM1021_REMOTE_TEMP_OVER remote_temp:1
|
||||
alarms SENSORS_ADM1021_ALARMS alarms:1
|
||||
die_code SENSORS_ADM1021_DIE_CODE die_code:1
|
||||
|
||||
|
||||
Chip `max1617'
|
||||
LABEL LABEL CLASS COMPUTE CLASS ACCESS MAGNITUDE
|
||||
temp NONE NONE R 0
|
||||
|
@@ -42,7 +42,7 @@ static unsigned int normal_isa[] = {SENSORS_ISA_END};
|
||||
static unsigned int normal_isa_range[] = {SENSORS_ISA_END};
|
||||
|
||||
/* Insmod parameters */
|
||||
SENSORS_INSMOD_3(adm1021,max1617,max1617a);
|
||||
SENSORS_INSMOD_4(adm1021,max1617,max1617a,thmc10);
|
||||
|
||||
/* adm1021 constants specified below */
|
||||
|
||||
@@ -51,7 +51,7 @@ SENSORS_INSMOD_3(adm1021,max1617,max1617a);
|
||||
#define ADM1021_REG_TEMP 0x00
|
||||
#define ADM1021_REG_REMOTE_TEMP 0x01
|
||||
#define ADM1021_REG_STATUS 0x02
|
||||
#define ADM1021_REG_MAN_ID 0x0FE /* should always read 0x41 */
|
||||
#define ADM1021_REG_MAN_ID 0x0FE /* 0x41 = AMD, 0x49 = TI, 0x4D = Maxim */
|
||||
#define ADM1021_REG_DEV_ID 0x0FF /* ADM1021 */
|
||||
#define ADM1021_REG_DIE_CODE 0x0FF /* MAX1617A */
|
||||
/* These use different addresses for reading/writing */
|
||||
@@ -138,7 +138,7 @@ static void adm1021_update_client(struct i2c_client *client);
|
||||
|
||||
/* This is the driver that will be inserted */
|
||||
static struct i2c_driver adm1021_driver = {
|
||||
/* name */ "adm1021, MAX1617 sensor driver",
|
||||
/* name */ "ADM1021, MAX1617 sensor driver",
|
||||
/* id */ I2C_DRIVERID_ADM1021,
|
||||
/* flags */ I2C_DF_NOTIFY,
|
||||
/* attach_adapter */ &adm1021_attach_adapter,
|
||||
@@ -242,6 +242,8 @@ static int adm1021_detect(struct i2c_adapter *adapter, int address, int kind)
|
||||
i = adm1021_read_value(new_client,ADM1021_REG_MAN_ID);
|
||||
if (i == 0x41)
|
||||
kind = adm1021;
|
||||
if (i == 0x49)
|
||||
kind = thmc10;
|
||||
else if ((i== 0x4d) &&
|
||||
(adm1021_read_value(new_client,ADM1021_REG_DEV_ID) == 0x01))
|
||||
kind = max1617a;
|
||||
@@ -258,6 +260,9 @@ static int adm1021_detect(struct i2c_adapter *adapter, int address, int kind)
|
||||
} else if (kind == adm1021) {
|
||||
type_name = "adm1021";
|
||||
client_name = "ADM1021 chip";
|
||||
} else if (kind == thmc10) {
|
||||
type_name = "thmc10";
|
||||
client_name = "THMC10 chip";
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
printk("adm1021.o: Internal error: unknown kind (%d)?!?",kind);
|
||||
|
@@ -282,6 +282,12 @@ use subs qw(lm78_detect lm78_isa_detect lm78_alias_detect lm75_detect
|
||||
i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e],
|
||||
i2c_detect => sub { adm1021_detect 2, @_ },
|
||||
},
|
||||
{
|
||||
name => "TI THMC10",
|
||||
driver => "adm1021",
|
||||
i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e],
|
||||
i2c_detect => sub { adm1021_detect 3, @_ },
|
||||
},
|
||||
{
|
||||
name => "Silicon Integrated Systems SIS5595",
|
||||
driver => "sis5595",
|
||||
@@ -1376,7 +1382,7 @@ sub adm9240_detect
|
||||
return (8);
|
||||
}
|
||||
|
||||
# $_[0]: Chip to detect (0 = ADM1021, 1 = MAX1617, 2 = MAX1617A)
|
||||
# $_[0]: Chip to detect (0 = ADM1021, 1 = MAX1617, 2 = MAX1617A, 3 = THMC10)
|
||||
# $_[1]: A reference to the file descriptor to access this chip.
|
||||
# We may assume an i2c_set_slave_addr was already done.
|
||||
# $_[2]: Address
|
||||
@@ -1391,6 +1397,7 @@ sub adm1021_detect
|
||||
my $reg;
|
||||
my ($chip, $file,$addr) = @_;
|
||||
return if $chip == 0 and i2c_smbus_read_byte_data($file,0xfe) != 0x41;
|
||||
return if $chip == 3 and i2c_smbus_read_byte_data($file,0xfe) != 0x49;
|
||||
return if $chip == 2 and i2c_smbus_read_byte_data($file,0xfe) != 0x4d and
|
||||
i2c_smbus_read_byte_data($file,0xff) != 0x01;
|
||||
# The remaining things are flaky at best. Perhaps something can be done
|
||||
|
@@ -250,7 +250,7 @@ void do_a_print(sensors_chip_name name)
|
||||
if (!strcmp(name.prefix,"lm75"))
|
||||
print_lm75(&name);
|
||||
else if (!strcmp(name.prefix,"adm1021") || !strcmp(name.prefix,"max1617") ||
|
||||
!strcmp(name.prefix,"max1617a"))
|
||||
!strcmp(name.prefix,"max1617a") || !strcmp(name.prefix, "thmc10"))
|
||||
print_adm1021(&name);
|
||||
else if (!strcmp(name.prefix,"adm9240") ||
|
||||
!strcmp(name.prefix,"ds1780") ||
|
||||
|
Reference in New Issue
Block a user