mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-02 23:35:57 +00:00
Add Dallas DS1631 detection.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5249 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -28,6 +28,7 @@ SVN-HEAD
|
|||||||
Fix the parsing of I2C addresses not to scan
|
Fix the parsing of I2C addresses not to scan
|
||||||
Detect and skip 1-register-only I2C devices
|
Detect and skip 1-register-only I2C devices
|
||||||
Avoid SMBus word transactions where possible
|
Avoid SMBus word transactions where possible
|
||||||
|
Add Dallas DS1631 detection
|
||||||
|
|
||||||
3.0.1 (2008-01-28)
|
3.0.1 (2008-01-28)
|
||||||
documentation: Update the application writing guidelines
|
documentation: Update the application writing guidelines
|
||||||
|
@@ -910,7 +910,7 @@ use vars qw(@pci_adapters_sis5595 @pci_adapters_sis645 @pci_adapters_sis96x);
|
|||||||
i2c_detect => sub { adm9240_detect(0, @_); },
|
i2c_detect => sub { adm9240_detect(0, @_); },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => "Dallas Semiconductor DS1621",
|
name => "Dallas Semiconductor DS1621/DS1631",
|
||||||
driver => "ds1621",
|
driver => "ds1621",
|
||||||
i2c_addrs => [0x48..0x4f],
|
i2c_addrs => [0x48..0x4f],
|
||||||
i2c_detect => sub { ds1621_detect(@_); },
|
i2c_detect => sub { ds1621_detect(@_); },
|
||||||
@@ -3812,7 +3812,10 @@ sub ds1621_detect
|
|||||||
return if ($slope != 0x10 || $counter > $slope);
|
return if ($slope != 0x10 || $counter > $slope);
|
||||||
|
|
||||||
my $temp = i2c_smbus_read_word_data($file,0xAA);
|
my $temp = i2c_smbus_read_word_data($file,0xAA);
|
||||||
return if $temp < 0 || ($temp & 0x7f00);
|
return if $temp < 0 || ($temp & 0x0f00);
|
||||||
|
# On the DS1631, the following two checks are too strict in theory,
|
||||||
|
# but in practice I very much doubt that anyone will set temperature
|
||||||
|
# limits not a multiple of 0.5 degrees C.
|
||||||
my $high = i2c_smbus_read_word_data($file,0xA1);
|
my $high = i2c_smbus_read_word_data($file,0xA1);
|
||||||
return if $high < 0 || ($high & 0x7f00);
|
return if $high < 0 || ($high & 0x7f00);
|
||||||
my $low = i2c_smbus_read_word_data($file,0xA2);
|
my $low = i2c_smbus_read_word_data($file,0xA2);
|
||||||
|
Reference in New Issue
Block a user