diff --git a/CHANGES b/CHANGES index 0d104588..f9569181 100644 --- a/CHANGES +++ b/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 diff --git a/kernel/chips/lm78.c b/kernel/chips/lm78.c index 6d3d87e4..046dedb5 100644 --- a/kernel/chips/lm78.c +++ b/kernel/chips/lm78.c @@ -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; diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 3af84c3d..7a387c09 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -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;