mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-11 16:40:16 +00:00
(Phil) A couple minor detection/kind-determination fixes.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@394 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
0b3a22ba4c
commit
a2a75fc49e
1 file changed
+2
-9
@@ -217,24 +217,17 @@ static int adm1021_detect(struct i2c_adapter *adapter, int address, int kind)
|
||||
new_client->adapter = adapter;
|
||||
new_client->driver = &adm1021_driver;
|
||||
|
||||
/* Now, we do the remaining detection. */
|
||||
|
||||
if (kind < 0) {
|
||||
if ((adm1021_read_value(new_client,ADM1021_REG_STATUS) & 0x03) != 0x80)
|
||||
goto ERROR1;
|
||||
}
|
||||
|
||||
/* Determine the chip type. */
|
||||
|
||||
if (kind <= 0) {
|
||||
i = adm1021_read_value(new_client,ADM1021_REG_MAN_ID);
|
||||
if (i == 0x41)
|
||||
kind = max1617;
|
||||
kind = adm1021;
|
||||
else if ((i== 0x4d) &&
|
||||
(adm1021_read_value(new_client,ADM1021_REG_DEV_ID) == 0x01))
|
||||
kind = max1617a;
|
||||
else
|
||||
kind = adm1021;
|
||||
kind = max1617;
|
||||
}
|
||||
|
||||
if (kind == max1617) {
|
||||
|
||||
Reference in new issue
Block a user