2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 06:15:15 +00:00

add w83791d detection, update documentation

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1782 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark D. Studebaker
2003-06-10 03:01:31 +00:00
parent a05fe9ed42
commit 2c31ea166c
4 changed files with 20 additions and 3 deletions

View File

@@ -881,6 +881,12 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
i2c_addrs => [0x20..0x2f],
i2c_detect => sub { w83781d_detect 2, @_},
} ,
{
name => "Winbond W83791D",
driver => "w83781d",
i2c_addrs => [0x20..0x2f],
i2c_detect => sub { w83781d_detect 7, @_},
} ,
{
name => "Winbond W83627HF",
driver => "w83781d",
@@ -2318,6 +2324,7 @@ sub lm87_detect
# $_[0]: Chip to detect (0 = W83781D, 1 = W83782D, 2 = W83783S,
# 3 = W83627HF, 4 = AS99127F, 6 = W83L784R/AR
# 7 = W83791D
# $_[1]: A reference to the file descriptor to access this chip.
# We may assume an i2c_set_slave_addr was already done.
# $_[2]: Address
@@ -2358,6 +2365,7 @@ sub w83781d_detect
return if $chip == 3 and $reg1 != 0x20;
return if $chip == 4 and $reg1 != 0x30;
return if $chip == 6 and $reg1 != 0x50;
return if $chip == 7 and $reg1 != 0x70;
$reg1 = i2c_smbus_read_byte_data($file,0x4a);
@res = (8);
push @res, ($reg1 & 0x07) + 0x48 unless $reg1 & 0x08 ;