mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-25 12:14:33 +00:00
sensors-detect: Nuvoton chip updates
Document driver support for NCT7802Y. Add detection of NCT7904D.
This commit is contained in:
1 parent
64629dc2f2
commit
da60f83fa2
2 files changed
+34
-1
No files matched your search
@@ -33,6 +33,8 @@ SVN HEAD
|
||||
Add detection of Intel 5500/5520/X58
|
||||
Loosen detection rules for TS3000/TSE2002
|
||||
Add detection of TSE2004 and TS3001
|
||||
Document driver support for NCT7802Y
|
||||
Add detection of NCT7904D
|
||||
|
||||
3.3.5 "Happy Birthday Beddy" (2014-01-22)
|
||||
libsensors: Improve documentation of two functions
|
||||
|
||||
@@ -734,9 +734,14 @@ use vars qw(@i2c_adapter_names);
|
||||
i2c_detect => sub { w83795_detect(@_); },
|
||||
}, {
|
||||
name => "Nuvoton NCT7802Y",
|
||||
driver => "to-be-written",
|
||||
driver => "nct7802",
|
||||
i2c_addrs => [0x28..0x2f],
|
||||
i2c_detect => sub { nct7802_detect(@_); },
|
||||
}, {
|
||||
name => "Nuvoton NCT7904D",
|
||||
driver => "nct7904",
|
||||
i2c_addrs => [0x2d..0x2e],
|
||||
i2c_detect => sub { nct7904_detect(@_); },
|
||||
}, {
|
||||
name => "Winbond W83627HF",
|
||||
driver => "use-isa-instead",
|
||||
@@ -5634,6 +5639,32 @@ sub nct7802_detect
|
||||
return 8;
|
||||
}
|
||||
|
||||
# Registers used:
|
||||
# 0x7a: Vendor ID
|
||||
# 0x7b: Chip ID
|
||||
# 0x7c: Device ID
|
||||
# 0xff: Bank Select
|
||||
#
|
||||
sub nct7904_detect
|
||||
{
|
||||
my ($reg);
|
||||
my ($file, $addr) = @_;
|
||||
|
||||
$reg = i2c_smbus_read_byte_data($file, 0x7a);
|
||||
return unless $reg == 0x50;
|
||||
|
||||
$reg = i2c_smbus_read_byte_data($file, 0x7b);
|
||||
return unless $reg == 0xc5;
|
||||
|
||||
$reg = i2c_smbus_read_byte_data($file, 0x7c);
|
||||
return unless ($reg & 0xf0) == 0x50;
|
||||
|
||||
$reg = i2c_smbus_read_byte_data($file, 0xff);
|
||||
return unless ($reg & 0xf8) == 0x00;
|
||||
|
||||
return 8;
|
||||
}
|
||||
|
||||
# Registers used:
|
||||
# 0x48: Full I2C Address
|
||||
# 0x4e: Vendor ID byte selection
|
||||
|
||||
Reference in new issue
Block a user