From 44d0906e31db8c846e485afca54aa37b1a0a19a2 Mon Sep 17 00:00:00 2001 From: Frodo Looijaard Date: Sat, 20 Feb 1999 14:40:24 +0000 Subject: [PATCH] Fixed Winbond LM75 emulations non-detect git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@261 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/detect/detect.pl | 7 ++----- prog/detect/sensors-detect | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/prog/detect/detect.pl b/prog/detect/detect.pl index 08001f15..68a3c1b9 100755 --- a/prog/detect/detect.pl +++ b/prog/detect/detect.pl @@ -636,9 +636,6 @@ sub scan_adapter next; next unless i2c_smbus_read_byte(\*FILE) >= 0; printf "Client found at address 0x%02x\n",$addr; - my @detection_list = (); - my $highest_conf = 0; - my $double_conf = 0; foreach $chip (@chip_ids) { if (contains $addr, @{$$chip{i2c_addrs}}) { print "Probing for $$chip{name}... "; @@ -796,8 +793,8 @@ sub w83781d_detect (i2c_smbus_read_byte_data($file,0x58) & 0xfe) != 0x10; $reg1 = i2c_smbus_read_byte_data($file,0x4a); @res = (8); - push @res, ($reg1 & 0x07) + 0x48 if $reg1 & 0x08; - push @res, (($reg1 & 0x80) >> 4) + 0x48 if $reg1 & 0x80; + push @res, ($reg1 & 0x07) + 0x48 unless $reg1 & 0x08; + push @res, (($reg1 & 0x80) >> 4) + 0x48 unless $reg1 & 0x80; return @res; } diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 08001f15..68a3c1b9 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -636,9 +636,6 @@ sub scan_adapter next; next unless i2c_smbus_read_byte(\*FILE) >= 0; printf "Client found at address 0x%02x\n",$addr; - my @detection_list = (); - my $highest_conf = 0; - my $double_conf = 0; foreach $chip (@chip_ids) { if (contains $addr, @{$$chip{i2c_addrs}}) { print "Probing for $$chip{name}... "; @@ -796,8 +793,8 @@ sub w83781d_detect (i2c_smbus_read_byte_data($file,0x58) & 0xfe) != 0x10; $reg1 = i2c_smbus_read_byte_data($file,0x4a); @res = (8); - push @res, ($reg1 & 0x07) + 0x48 if $reg1 & 0x08; - push @res, (($reg1 & 0x80) >> 4) + 0x48 if $reg1 & 0x80; + push @res, ($reg1 & 0x07) + 0x48 unless $reg1 & 0x08; + push @res, (($reg1 & 0x80) >> 4) + 0x48 unless $reg1 & 0x80; return @res; }