(mds) Try again for as99127f detection. Remove verification of

address register 0x48.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@625 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark D. Studebaker committed 1999-11-12 03:13:22 +00:00
1 parent 03866e7fb8
commit b2a1ac6622
2 files changed
+13 -7

No files matched your search

+9 -5
View File
@@ -714,15 +714,19 @@ int w83781d_detect(struct i2c_adapter *adapter, int address,
if (kind < 0) {
if (w83781d_read_value(new_client,W83781D_REG_CONFIG) & 0x80)
goto ERROR1;
if (!is_isa &&
(w83781d_read_value(new_client,W83781D_REG_I2C_ADDR) != address))
goto ERROR1;
val1 = w83781d_read_value(new_client,W83781D_REG_BANK);
val2 = w83781d_read_value(new_client,W83781D_REG_CHIPMAN);
/* Check for Winbond or Asus ID if in bank 0 */
if (!(val1 & 0x07) &&
((!(val1 & 0x80) && (val2 != 0xa3)) ||
((val1 & 0x80) && (val2 != 0x5c))))
((!(val1 & 0x80) && (val2 != 0xa3) && (val2 != 0xc3)) ||
((val1 & 0x80) && (val2 != 0x5c) && (val2 != 0x12))))
goto ERROR1;
/* If Winbond SMBus, check address at 0x48. Asus doesn't support */
if ((!is_isa) && ((!(val1 & 0x80) && (val2 == 0xa3)) ||
((val1 & 0x80) && (val2 == 0x5c)))) {
if (w83781d_read_value(new_client,W83781D_REG_I2C_ADDR) != address)
goto ERROR1;
}
}
/* We have either had a force parameter, or we have already detected the
+4 -2
View File
@@ -1286,14 +1286,16 @@ sub lm80_detect
# 0x58: Device ID (only when in bank 0); ignore LSB.
# Note: Fails if the W8378xD is not in bank 0!
# Note: Detection overrules a previous LM78 detection
# Note: AS99127F address register 0x48 not supported?
sub w83781d_detect
{
my ($reg1,$reg2,@res);
my ($chip,$file,$addr) = @_;
return unless i2c_smbus_read_byte_data($file,0x48) == $addr;
return unless (i2c_smbus_read_byte_data($file,0x48) == $addr)
and ($chip < 4);
$reg1 = i2c_smbus_read_byte_data($file,0x4e);
$reg2 = i2c_smbus_read_byte_data($file,0x4f);
if ($chip < 3) {
if ($chip < 4) {
return unless (($reg1 & 0x80) == 0x00 and $reg2 == 0xa3) or
(($reg1 & 0x80) == 0x80 and $reg2 == 0x5c);
}