mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-20 19:41:47 +00:00
Drop separate LM78-J entry, we really have no good reason to handle
the LM78-J differently from the original LM78. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5416 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
f60a79b999
commit
ec73088454
1 file changed
+4
-15
@@ -538,15 +538,6 @@ use vars qw(@i2c_adapter_names);
|
||||
isa_detect => sub { lm78_isa_detect(0, @_); },
|
||||
alias_detect => sub { winbond_alias_detect(@_, 0x2b, 0x3d); },
|
||||
},
|
||||
{
|
||||
name => "National Semiconductor LM78-J",
|
||||
driver => "lm78",
|
||||
i2c_addrs => [0x28..0x2f],
|
||||
i2c_detect => sub { lm78_detect(1, @_); },
|
||||
isa_addrs => [0x290],
|
||||
isa_detect => sub { lm78_isa_detect(1, @_); },
|
||||
alias_detect => sub { winbond_alias_detect(@_, 0x2b, 0x3d); },
|
||||
},
|
||||
{
|
||||
name => "National Semiconductor LM79",
|
||||
driver => "lm78",
|
||||
@@ -3392,7 +3383,7 @@ sub mtp008_detect
|
||||
return (3);
|
||||
}
|
||||
|
||||
# $_[0]: Chip to detect (0 = LM78, 1 = LM78-J, 2 = LM79)
|
||||
# $_[0]: Chip to detect (0 = LM78, 2 = LM79)
|
||||
# $_[1]: A reference to the file descriptor to access this chip.
|
||||
# $_[2]: Address
|
||||
# Returns: undef if not detected, (6) if detected.
|
||||
@@ -3407,8 +3398,7 @@ sub lm78_detect
|
||||
return unless i2c_smbus_read_byte_data($file, 0x48) == $addr;
|
||||
return unless (i2c_smbus_read_byte_data($file, 0x40) & 0x80) == 0x00;
|
||||
$reg = i2c_smbus_read_byte_data($file, 0x49);
|
||||
return unless ($chip == 0 and ($reg == 0x00 or $reg == 0x20)) or
|
||||
($chip == 1 and $reg == 0x40) or
|
||||
return unless ($chip == 0 and ($reg == 0x00 or $reg == 0x20 or $reg == 0x40)) or
|
||||
($chip == 2 and ($reg & 0xfe) == 0xc0);
|
||||
|
||||
# Explicitly prevent misdetection of Winbond chips
|
||||
@@ -3418,7 +3408,7 @@ sub lm78_detect
|
||||
return (6);
|
||||
}
|
||||
|
||||
# $_[0]: Chip to detect (0 = LM78, 1 = LM78-J, 2 = LM79)
|
||||
# $_[0]: Chip to detect (0 = LM78, 2 = LM79)
|
||||
# $_[1]: Address
|
||||
# Returns: undef if not detected, 6 if detected.
|
||||
# Note: Only address 0x290 is scanned at this moment.
|
||||
@@ -3438,8 +3428,7 @@ sub lm78_isa_detect
|
||||
|
||||
return unless (isa_read_i5d6($addr, 0x40) & 0x80) == 0x00;
|
||||
my $reg = isa_read_i5d6($addr, 0x49);
|
||||
return unless ($chip == 0 and ($reg == 0x00 or $reg == 0x20)) or
|
||||
($chip == 1 and $reg == 0x40) or
|
||||
return unless ($chip == 0 and ($reg == 0x00 or $reg == 0x20 or $reg == 0x40)) or
|
||||
($chip == 2 and ($reg & 0xfe) == 0xc0);
|
||||
|
||||
# Explicitly prevent misdetection of Winbond chips
|
||||
|
||||
Reference in new issue
Block a user