mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-03 07:45:30 +00:00
recognize lm78's with chipid register (0x49) == 0x20, as
reported by Vernon McPherron <vernon@xnote.com> git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@998 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
6
CHANGES
6
CHANGES
@@ -18,8 +18,10 @@ ask CVS about it:
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
2.5.6 (2001????)
|
||||
Module sensors: add xxx_init() calls for drivers added to mkpatch in 2.5.5.
|
||||
Program mkpatch.pl: fix adm9240 typos
|
||||
Module lm78: Recognize chipid=0x20
|
||||
Module sensors: Add xxx_init() calls for drivers added to mkpatch in 2.5.5.
|
||||
Program mkpatch.pl: Fix adm9240 typos
|
||||
Program sensors-detect: Recognize lm78 with chipid=0x20
|
||||
|
||||
2.5.5 (20010115)
|
||||
NOTE: i2c 2.5.5 MUST BE be compiled and installed first, UNLESS
|
||||
|
@@ -389,7 +389,7 @@ int lm78_detect(struct i2c_adapter *adapter, int address,
|
||||
/* Determine the chip type. */
|
||||
if (kind <= 0) {
|
||||
i = lm78_read_value(new_client, LM78_REG_CHIPID);
|
||||
if (i == 0x00)
|
||||
if (i == 0x00 || i == 0x20)
|
||||
kind = lm78;
|
||||
else if (i == 0x40)
|
||||
kind = lm78j;
|
||||
|
@@ -1503,7 +1503,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
|
||||
return unless ($chip == 0 and ($reg == 0x00 or $reg == 0x20)) or
|
||||
($chip == 1 and $reg == 0x40) or
|
||||
($chip == 2 and ($reg & 0xfe) == 0xc0);
|
||||
return (7);
|
||||
@@ -1529,7 +1529,7 @@ sub lm78_isa_detect
|
||||
my $readproc = sub { isa_read_byte $addr + 5, $addr + 6, @_ };
|
||||
return unless (&$readproc(0x40) & 0x80) == 0x00;
|
||||
my $reg = &$readproc(0x49);
|
||||
return unless ($chip == 0 and $reg == 0x00) or
|
||||
return unless ($chip == 0 and ($reg == 0x00 or $reg == 0x20)) or
|
||||
($chip == 1 and $reg == 0x40) or
|
||||
($chip == 2 and ($reg & 0xfe) == 0xc0);
|
||||
return 7;
|
||||
|
Reference in New Issue
Block a user