mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-01 13:20:30 +00:00
(mds) add support for force parameter. This allows for as99127f users to
use lm75 driver for temp2 and temp3 until I fix w83781d driver.
LM75 detection fails on as99127f (and w83781d temp2).
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@670 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
0e3dc7204e
commit
87993e7c02
1 file changed
+11
-9
+11
-9
@@ -177,15 +177,17 @@ int lm75_detect(struct i2c_adapter *adapter, int address,
|
||||
new_client->flags = 0;
|
||||
|
||||
/* Now, we do the remaining detection. It is lousy. */
|
||||
cur = i2c_smbus_read_word_data(new_client,0);
|
||||
conf = i2c_smbus_read_byte_data(new_client,1);
|
||||
hyst = i2c_smbus_read_word_data(new_client,2);
|
||||
os = i2c_smbus_read_word_data(new_client,3);
|
||||
for (i = 0; i <= 0x1f; i++)
|
||||
if ((i2c_smbus_read_byte_data(new_client,i*8+1) != conf) ||
|
||||
(i2c_smbus_read_word_data(new_client,i*8+2) != hyst) ||
|
||||
(i2c_smbus_read_word_data(new_client,i*8+3) != os))
|
||||
goto ERROR1;
|
||||
if (kind < 0) {
|
||||
cur = i2c_smbus_read_word_data(new_client,0);
|
||||
conf = i2c_smbus_read_byte_data(new_client,1);
|
||||
hyst = i2c_smbus_read_word_data(new_client,2);
|
||||
os = i2c_smbus_read_word_data(new_client,3);
|
||||
for (i = 0; i <= 0x1f; i++)
|
||||
if ((i2c_smbus_read_byte_data(new_client,i*8+1) != conf) ||
|
||||
(i2c_smbus_read_word_data(new_client,i*8+2) != hyst) ||
|
||||
(i2c_smbus_read_word_data(new_client,i*8+3) != os))
|
||||
goto ERROR1;
|
||||
}
|
||||
|
||||
/* Determine the chip type - only one kind supported! */
|
||||
if (kind <= 0)
|
||||
|
||||
Reference in new issue
Block a user