mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-29 21:08:19 +00:00
(jrm): New driver and other support for the Maxim MAX6650 and MAX6651 chips.
Mainly targetted (and tested) with the 6651, but should work with
the MAX6550.
See doc/chips/max6650 for notes, bugs, assumptions, etc.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1987 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
ebb1dc9a20
commit
45576fb3fd
11 files changed
+786
-2
No files matched your search
@@ -776,7 +776,7 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
|
||||
fscscy_detect pcf8591_detect arp_detect ipmi_kcs_detect
|
||||
ipmi_smic_detect via8231_isa_detect lm85_detect smartbatt_detect
|
||||
adm1026_detect w83l785ts_detect lm83_detect lm90_detect
|
||||
saa1064_detect w83l784r_detect mozart_detect);
|
||||
saa1064_detect w83l784r_detect mozart_detect max6650_detect);
|
||||
|
||||
# This is a list of all recognized chips.
|
||||
# Each entry must have the following fields:
|
||||
@@ -1060,6 +1060,12 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
|
||||
i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e],
|
||||
i2c_detect => sub { adm1021_detect 3, @_ },
|
||||
},
|
||||
{
|
||||
name => "Maxim MAX6650/MAX6651",
|
||||
driver => "max6650",
|
||||
i2c_addrs => [0x1b,0x1f,0x48,0x4b],
|
||||
i2c_detect => sub { max6650_detect 0, @_ },
|
||||
},
|
||||
{
|
||||
name => "TI THMC10",
|
||||
driver => "adm1021",
|
||||
@@ -3400,6 +3406,34 @@ sub w83l785ts_detect
|
||||
return (8);
|
||||
}
|
||||
|
||||
# $_[0]: Chip to detect. Always zero for now, but available for future use
|
||||
# if somebody finds a way to distinguish MAX6650 and MAX6651.
|
||||
# $_[1]: A reference to the file descriptor to access this chip.
|
||||
# We may assume an i2c_set_slave_addr was already done.
|
||||
# $_[2]: Address
|
||||
# Returns: undef if not detected, 4 if detected.
|
||||
#
|
||||
# The max6650 has no device ID register. However, a few registers have
|
||||
# spare bits, which are documented as being always zero on read. We read
|
||||
# all of these registers check the spare bits. Any non-zero means this
|
||||
# is not a max6650/1.
|
||||
#
|
||||
# The always zero bits are:
|
||||
# configuration byte register (0x02) - top 2 bits
|
||||
# gpio status register (0x14) - top 3 bits
|
||||
# alarm enable register (0x08) - top 3 bits
|
||||
# alarm status register (0x0A) - top 3 bits
|
||||
# tachometer count time register (0x16) - top 6 bits
|
||||
sub max6650_detect
|
||||
{
|
||||
my ($chip, $file) = @_;
|
||||
return if i2c_smbus_read_byte_data($file,0x16) & 0xFC;
|
||||
return if i2c_smbus_read_byte_data($file,0x0A) & 0xE0;
|
||||
return if i2c_smbus_read_byte_data($file,0x08) & 0xE0;
|
||||
return if i2c_smbus_read_byte_data($file,0x14) & 0xE0;
|
||||
return if i2c_smbus_read_byte_data($file,0x02) & 0xC0;
|
||||
return 4;
|
||||
}
|
||||
|
||||
|
||||
################
|
||||
|
||||
Reference in new issue
Block a user