From 1a4bc3d1dd8134397135da3b4c06793fa665bb86 Mon Sep 17 00:00:00 2001 From: Philip Edelbrock Date: Sun, 28 Feb 1999 17:37:50 +0000 Subject: [PATCH] (Phil) OK, I changed my mind. Last commit for the eeprom detection stuff, I hope! git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@280 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/detect/detect.pl | 18 ++++-------------- prog/detect/sensors-detect | 18 ++++-------------- 2 files changed, 8 insertions(+), 28 deletions(-) diff --git a/prog/detect/detect.pl b/prog/detect/detect.pl index b5d2770a..8cc13f59 100755 --- a/prog/detect/detect.pl +++ b/prog/detect/detect.pl @@ -211,16 +211,10 @@ use subs qw(lm78_detect lm78_isa_detect lm78_alias_detect lm75_detect isa_detect => sub { sis5595_isa_detect @_ }, }, { - name => "Serial EEPROM", + name => "Serial EEPROM (PC-100 DIMM)", driver => "eeprom", i2c_addrs => [0x50..0x57], - i2c_detect => sub { eeprom_detect 0,@_ }, - }, - { - name => "Serial EEPROM on PC-100 DIMM", - driver => "eeprom", - i2c_addrs => [0x50..0x57], - i2c_detect => sub { eeprom_detect 1,@_ }, + i2c_detect => sub { eeprom_detect @_ }, } ); @@ -1299,7 +1293,7 @@ sub sis5595_isa_detect # 0x00-0x63: PC-100 Data and Checksum sub eeprom_detect { - my ($chip,$file,$addr) = @_; + my ($file,$addr) = @_; # Check the checksum for validity (only works for PC-100 DIMMs) my $checksum = 0; for (my $i = 0; $i <= 62; $i = $i + 1) { @@ -1310,11 +1304,7 @@ sub eeprom_detect return (8); } # Even if checksum test fails, it still may be an eeprom - if ($chip == 0) { - return (1); - } else { - return; - } + return (1); } ################ diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index b5d2770a..8cc13f59 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -211,16 +211,10 @@ use subs qw(lm78_detect lm78_isa_detect lm78_alias_detect lm75_detect isa_detect => sub { sis5595_isa_detect @_ }, }, { - name => "Serial EEPROM", + name => "Serial EEPROM (PC-100 DIMM)", driver => "eeprom", i2c_addrs => [0x50..0x57], - i2c_detect => sub { eeprom_detect 0,@_ }, - }, - { - name => "Serial EEPROM on PC-100 DIMM", - driver => "eeprom", - i2c_addrs => [0x50..0x57], - i2c_detect => sub { eeprom_detect 1,@_ }, + i2c_detect => sub { eeprom_detect @_ }, } ); @@ -1299,7 +1293,7 @@ sub sis5595_isa_detect # 0x00-0x63: PC-100 Data and Checksum sub eeprom_detect { - my ($chip,$file,$addr) = @_; + my ($file,$addr) = @_; # Check the checksum for validity (only works for PC-100 DIMMs) my $checksum = 0; for (my $i = 0; $i <= 62; $i = $i + 1) { @@ -1310,11 +1304,7 @@ sub eeprom_detect return (8); } # Even if checksum test fails, it still may be an eeprom - if ($chip == 0) { - return (1); - } else { - return; - } + return (1); } ################