Changeset 5423
- Timestamp:
- 11/24/08 17:59:25 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect
r5422 r5423 813 813 }, 814 814 { 815 name => "Genesys Logic GL518SM Revision 0x00",815 name => "Genesys Logic GL518SM", 816 816 driver => "gl518sm", 817 817 i2c_addrs => [0x2c, 0x2d], 818 i2c_detect => sub { gl518sm_detect(@_, 0); }, 819 }, 820 { 821 name => "Genesys Logic GL518SM Revision 0x80", 822 driver => "gl518sm", 823 i2c_addrs => [0x2c, 0x2d], 824 i2c_detect => sub { gl518sm_detect(@_, 1); }, 818 i2c_detect => sub { gl518sm_detect(@_); }, 825 819 }, 826 820 { … … 4367 4361 } 4368 4362 4369 # Chip to detect: 0 = Revision 0x00, 1 = Revision 0x804370 4363 # Registers used: 4371 4364 # 0x00: Device ID … … 4375 4368 sub gl518sm_detect 4376 4369 { 4377 my ($file, $addr , $chip) = @_;4370 my ($file, $addr) = @_; 4378 4371 my $reg; 4379 4372 return unless i2c_smbus_read_byte_data($file, 0x00) == 0x80; 4380 4373 return unless (i2c_smbus_read_byte_data($file, 0x03) & 0x80) == 0x00; 4381 4374 $reg = i2c_smbus_read_byte_data($file, 0x01); 4382 return unless ($chip == 0 and $reg == 0x00) or 4383 ($chip == 1 and $reg == 0x80); 4375 return unless $reg == 0x00 or $reg == 0x80; 4384 4376 return (6); 4385 4377 }
