Changeset 5045
- Timestamp:
- 11/26/07 14:01:30 (5 years ago)
- Location:
- lm-sensors/branches/lm-sensors-3.0.0
- Files:
-
- 2 modified
-
CHANGES (modified) (1 diff)
-
prog/detect/sensors-detect (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/branches/lm-sensors-3.0.0/CHANGES
r5038 r5045 1 1 lm-sensors CHANGES file 2 2 ----------------------- 3 4 SVN 5 sensors-detect: Drop PCA9540 detection 3 6 4 7 3.0.0 (2007-11-24) -
lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect
r5016 r5045 1463 1463 }, 1464 1464 { 1465 name => "Philips Semiconductors PCA9540",1466 driver => "pca9540",1467 i2c_addrs => [0x70],1468 i2c_detect => sub { pca9540_detect(@_); },1469 },1470 {1471 1465 name => "Smart Battery", 1472 1466 driver => "smartbatt", … … 5212 5206 5213 5207 return 7; 5214 }5215 5216 # $_[0]: A reference to the file descriptor to access this chip.5217 # $_[1]: Address5218 # Returns: undef if not detected, 1 if detected5219 # Detection is rather difficult, since the PCA9540 has a single register.5220 # Fortunately, no other device is known to live at this address.5221 sub pca9540_detect5222 {5223 my ($file, $addr) = @_;5224 my $reg = i2c_smbus_read_byte($file);5225 5226 return if ($reg & 0xfa);5227 return if $reg != i2c_smbus_read_byte($file);5228 return if $reg != i2c_smbus_read_byte($file);5229 return if $reg != i2c_smbus_read_byte($file);5230 5231 return 1;5232 5208 } 5233 5209
