(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:
Mark D. Studebaker committed 1999-08-22 22:58:52 +00:00
1 parent 5f77505190
commit 0208181806
7 files changed
+52 -8

No files matched your search

+8 -3
View File
@@ -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);