2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 14:25:39 +00:00

Add detection of SMSC EMC6W201.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5967 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare
2011-05-05 15:39:04 +00:00
parent 16e09f39b7
commit ee792ce837
2 changed files with 21 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ SVN HEAD
Add detection of ITE IT8516E/F/G
Integrate with systemd
Drop unreliable smart battery detection
Add detection of SMSC EMC6W201
3.3.0 (2011-03-28)
Makefile: Check for bison and flex

View File

@@ -561,6 +561,11 @@ use vars qw(@i2c_adapter_names);
driver => "lm85",
i2c_addrs => [0x2c..0x2e],
i2c_detect => sub { lm85_detect(@_, 8); },
}, {
name => "SMSC EMC6W201",
driver => "to-be-written",
i2c_addrs => [0x2c..0x2e],
i2c_detect => sub { emc6w201_detect(@_); },
}, {
name => "Winbond WPCD377I",
driver => "not-a-sensor",
@@ -4926,6 +4931,21 @@ sub lm85_detect
return 7;
}
# Registers used:
# 0x3e: Vendor register
# 0x3f: Version/Stepping register
sub emc6w201_detect
{
my ($file, $addr) = @_;
my $vendor = i2c_smbus_read_byte_data($file, 0x3e);
my $verstep = i2c_smbus_read_byte_data($file, 0x3f);
return if $vendor != 0x5c; # SMSC
return if $verstep < 0xb0 || $verstep < 0xb1; # EMC6W201
return 6;
}
# Chip to detect: 0 = LM87, 1 = ADM1024
# Registers used:
# 0x3e: Company ID