mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 22:35:23 +00:00
Differentiate between PC8374L and WPCD377I. Both chips have the same
device ID so we use the revision register to differentiate between them, using custom detection functions. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5680 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -4,6 +4,7 @@ lm-sensors CHANGES file
|
|||||||
SVN-HEAD
|
SVN-HEAD
|
||||||
sensors-detect: Add nNidia nForce MCP78S SMBus detection
|
sensors-detect: Add nNidia nForce MCP78S SMBus detection
|
||||||
Display Super-I/O address even if LD is disabled
|
Display Super-I/O address even if LD is disabled
|
||||||
|
Differentiate between PC8374L and WPCD377I
|
||||||
|
|
||||||
3.1.0 "Happy Birthday Lina" (2009-02-28)
|
3.1.0 "Happy Birthday Lina" (2009-02-28)
|
||||||
libsensors: Add support for instantaneous power sensors
|
libsensors: Add support for instantaneous power sensors
|
||||||
|
@@ -1163,6 +1163,9 @@ use vars qw(@i2c_adapter_names);
|
|||||||
# devid: The device ID we have to match (base device)
|
# devid: The device ID we have to match (base device)
|
||||||
# devid_mask (optional): Bitmask to apply before checking the device ID
|
# devid_mask (optional): Bitmask to apply before checking the device ID
|
||||||
# logdev: The logical device containing the sensors
|
# logdev: The logical device containing the sensors
|
||||||
|
# check (optional): A function to refine the detection. Will be passed
|
||||||
|
# the index and data ports as parameters. Must return 1 for a matching
|
||||||
|
# device, 0 otherwise.
|
||||||
# features (optional): Features supported by this device, amongst:
|
# features (optional): Features supported by this device, amongst:
|
||||||
# * FEAT_IN
|
# * FEAT_IN
|
||||||
# * FEAT_FAN
|
# * FEAT_FAN
|
||||||
@@ -1177,11 +1180,25 @@ use constant FEAT_SMBUS => (1 << 7);
|
|||||||
|
|
||||||
@superio_ids_natsemi = (
|
@superio_ids_natsemi = (
|
||||||
{
|
{
|
||||||
name => "Nat. Semi. PC8374L Super IO Sensors",
|
name => "Nat. Semi. PC8374L Super IO Sensors", # Also Nuvoton WPCD374L
|
||||||
driver => "to-be-written",
|
driver => "to-be-written",
|
||||||
devid => 0xf1,
|
devid => 0xf1,
|
||||||
|
check => sub {
|
||||||
|
outb($_[0], 0x27);
|
||||||
|
# Guess work; seen so far: 0x11
|
||||||
|
return (inb($_[1]) < 0x80);
|
||||||
|
},
|
||||||
logdev => 0x08,
|
logdev => 0x08,
|
||||||
features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
|
features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
|
||||||
|
}, {
|
||||||
|
name => "Nuvoton WPCD377I Super IO", # Also WPCD376I
|
||||||
|
driver => "not-a-sensor",
|
||||||
|
devid => 0xf1,
|
||||||
|
check => sub {
|
||||||
|
outb($_[0], 0x27);
|
||||||
|
# Guess work; seen so far: 0x91 (twice)
|
||||||
|
return (inb($_[1]) >= 0x80);
|
||||||
|
},
|
||||||
}, {
|
}, {
|
||||||
name => "Nat. Semi. PC87351 Super IO Fan Sensors",
|
name => "Nat. Semi. PC87351 Super IO Fan Sensors",
|
||||||
driver => "to-be-written",
|
driver => "to-be-written",
|
||||||
@@ -3205,6 +3222,10 @@ sub probe_superio
|
|||||||
my ($addrreg, $datareg, $chip) = @_;
|
my ($addrreg, $datareg, $chip) = @_;
|
||||||
my ($val, $addr);
|
my ($val, $addr);
|
||||||
|
|
||||||
|
if (exists $chip->{check}) {
|
||||||
|
return 0 unless $chip->{check}($addrreg, $datareg);
|
||||||
|
}
|
||||||
|
|
||||||
printf "\%-60s", "Found `$chip->{name}'";
|
printf "\%-60s", "Found `$chip->{name}'";
|
||||||
|
|
||||||
# Does it have hardware monitoring capabilities?
|
# Does it have hardware monitoring capabilities?
|
||||||
|
Reference in New Issue
Block a user