From 7b714e3c0274fee5f4fb3811be2bfa2c1e570e27 Mon Sep 17 00:00:00 2001 From: "Mark D. Studebaker" Date: Sat, 20 May 2000 19:45:13 +0000 Subject: [PATCH] (mds) add w83697hf detection. No driver support yet. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@810 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/detect/sensors-detect | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 08644ef8..83313a87 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -358,6 +358,12 @@ use subs qw(lm78_detect lm78_isa_detect lm78_alias_detect lm75_detect i2c_driver_addrs => [0x20..0x2f], i2c_detect => sub { w83781d_detect 4, @_}, } , + { + name => "Winbond W83697HF", +# driver => "w83781d", + isa_addrs => [0x290], + isa_detect => sub { w83781d_isa_detect 5, @_ }, + } , { name => "Genesys Logic GL518SM Revision 0x00", driver => "gl518sm", @@ -1456,7 +1462,7 @@ sub w83781d_detect or ($chip == 4); $reg1 = i2c_smbus_read_byte_data($file,0x4e); $reg2 = i2c_smbus_read_byte_data($file,0x4f); - if ($chip < 4) { + if ($chip != 4) { return unless (($reg1 & 0x80) == 0x00 and $reg2 == 0xa3) or (($reg1 & 0x80) == 0x80 and $reg2 == 0x5c); } @@ -1494,8 +1500,8 @@ sub w83781d_alias_detect return 1; } -# $_[0]: Chip to detect (0 = W83781D, 1 = W83782D, 3 = W83627HF) -# W83783S not on ISA bus. +# $_[0]: Chip to detect (0 = W83781D, 1 = W83782D, 3 = W83627HF, 5 = W83697HF) +# (W83783S and AS99127F not on ISA bus) # $_[1]: Address # Returns: undef if not detected, (8) if detected. sub w83781d_isa_detect @@ -1523,6 +1529,7 @@ sub w83781d_isa_detect return if $chip == 0 and $reg1 != 0x10; return if $chip == 1 and $reg1 != 0x30; return if $chip == 3 and $reg1 != 0x20; + return if $chip == 5 and $reg1 != 0x60; return 8; }