Additional debug message on thermistor/thermal diodes conflict.

Implement init sequence as documented by National Semiconductor
        (init >= 2).


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2620 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2004-06-30 21:01:32 +00:00
1 parent 049b4667ba
commit 96ce2beda2
1 file changed
+16 -1
+16 -1
View File
@@ -829,8 +829,14 @@ static void pc87360_init_client(struct i2c_client *client, int use_thermistors)
diodes */
reg = pc87360_read_value(data, LD_TEMP, (i-11)/2,
PC87365_REG_TEMP_STATUS);
if (reg & 0x01)
if (reg & 0x01) {
#ifdef DEBUG
printk(KERN_DEBUG "pc87360.o: Skipping "
"temp%d, pin already in use by ",
"temp%d\n", i-7, (i-11)/2);
#endif
continue;
}
/* Forcibly enable thermistor channel */
reg = pc87360_read_value(data, LD_IN, i,
@@ -874,6 +880,15 @@ static void pc87360_init_client(struct i2c_client *client, int use_thermistors)
PC87365_REG_TEMP_CONFIG,
reg & 0xFE);
}
if (init >= 2) {
/* Chip config as documented by National Semi. */
pc87360_write_value(data, LD_TEMP, 0xF, 0xA, 0x08);
pc87360_write_value(data, LD_TEMP, 0xF, 0xB, 0x04);
pc87360_write_value(data, LD_TEMP, 0xF, 0xC, 0x35);
pc87360_write_value(data, LD_TEMP, 0xF, 0xD, 0x05);
pc87360_write_value(data, LD_TEMP, 0xF, 0xE, 0x05);
}
}
}