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:
1
CHANGES
1
CHANGES
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user