mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-30 21:18:20 +00:00
allow force and force_fscpos
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1184 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
444990c51f
commit
90b82c0b92
1 file changed
+13
-21
+13
-21
@@ -288,29 +288,21 @@ int fscpos_detect(struct i2c_adapter *adapter, int address,
|
|||||||
new_client->driver = &fscpos_driver;
|
new_client->driver = &fscpos_driver;
|
||||||
new_client->flags = 0;
|
new_client->flags = 0;
|
||||||
|
|
||||||
/* Now, we do the remaining detection. */
|
/* Do the remaining detection unless force or force_fscpos parameter */
|
||||||
if (fscpos_read_value(new_client, FSCPOS_REG_IDENT_0) != 0x50)
|
if (kind < 0) {
|
||||||
goto ERROR1;
|
if (fscpos_read_value(new_client, FSCPOS_REG_IDENT_0) != 0x50)
|
||||||
if (fscpos_read_value(new_client, FSCPOS_REG_IDENT_1) != 0x45)
|
goto ERROR1;
|
||||||
goto ERROR1;
|
if (fscpos_read_value(new_client, FSCPOS_REG_IDENT_1) != 0x45)
|
||||||
if (fscpos_read_value(new_client, FSCPOS_REG_IDENT_2) != 0x47)
|
goto ERROR1;
|
||||||
goto ERROR1;
|
if (fscpos_read_value(new_client, FSCPOS_REG_IDENT_2) != 0x47)
|
||||||
|
goto ERROR1;
|
||||||
/* Determine the chip type - only one kind supported! */
|
|
||||||
if (kind <= 0)
|
|
||||||
kind = fscpos;
|
|
||||||
|
|
||||||
if (kind == fscpos) {
|
|
||||||
type_name = "fscpos";
|
|
||||||
client_name = "fsc poseidon chip";
|
|
||||||
} else {
|
|
||||||
#ifdef DEBUG
|
|
||||||
printk("fscpos.o: Internal error: unknown kind (%d)?!?",
|
|
||||||
kind);
|
|
||||||
#endif
|
|
||||||
goto ERROR1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kind = fscpos;
|
||||||
|
|
||||||
|
type_name = "fscpos";
|
||||||
|
client_name = "fsc poseidon chip";
|
||||||
|
|
||||||
/* Fill in the remaining client fields and put it into the global list */
|
/* Fill in the remaining client fields and put it into the global list */
|
||||||
strcpy(new_client->name, client_name);
|
strcpy(new_client->name, client_name);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user