mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-02 15:25:38 +00:00
(mds) add driver name for adm1025 detection.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@802 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -402,8 +402,8 @@ use subs qw(lm78_detect lm78_isa_detect lm78_alias_detect lm75_detect
|
||||
},
|
||||
{
|
||||
name => "Analog Devices ADM1025",
|
||||
# driver => "xxxxxxx",
|
||||
i2c_addrs => [0x2c..0x2f],
|
||||
driver => "adm1025",
|
||||
i2c_addrs => [0x2c..0x2e],
|
||||
i2c_detect => sub { adm1025_detect 0, @_ }
|
||||
},
|
||||
{
|
||||
@@ -1624,7 +1624,6 @@ sub adm1022_detect
|
||||
($chip == 1 and $reg == 0x49);
|
||||
return unless (i2c_smbus_read_byte_data($file,0x40) & 0x80) == 0x00;
|
||||
return unless (i2c_smbus_read_byte_data($file,0x3f) & 0xc0) == 0xc0;
|
||||
|
||||
return (8);
|
||||
}
|
||||
|
||||
@@ -1643,10 +1642,9 @@ sub adm1025_detect
|
||||
my $reg;
|
||||
my ($chip, $file,$addr) = @_;
|
||||
$reg = i2c_smbus_read_byte_data($file,0x3e);
|
||||
return unless ($chip == 0 and $reg == 0x41);
|
||||
return unless ($reg == 0x41);
|
||||
return unless (i2c_smbus_read_byte_data($file,0x40) & 0x80) == 0x00;
|
||||
return unless (i2c_smbus_read_byte_data($file,0x3f) & 0xc0) == 0x20;
|
||||
|
||||
return (8);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user