Improve GL525 detection a bit, fix the (missing) driver name.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5426 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2008-11-24 17:15:40 +00:00
1 parent e040e561ba
commit 0d2a30a53c
1 file changed
+3 -1
+3 -1
View File
@@ -825,7 +825,7 @@ use vars qw(@i2c_adapter_names);
}, },
{ {
name => "Genesys Logic GL525SM", name => "Genesys Logic GL525SM",
driver => "Unwritten (GL525SM)", driver => "to-be-written",
i2c_addrs => [0x2d], i2c_addrs => [0x2d],
i2c_detect => sub { gl525sm_detect(@_); }, i2c_detect => sub { gl525sm_detect(@_); },
}, },
@@ -4382,11 +4382,13 @@ sub gl518sm_detect
# Registers used: # Registers used:
# 0x00: Device ID # 0x00: Device ID
# 0x03: Configuration
# Mediocre detection # Mediocre detection
sub gl525sm_detect sub gl525sm_detect
{ {
my ($file, $addr) = @_; my ($file, $addr) = @_;
return unless i2c_smbus_read_byte_data($file, 0x00) == 0x25; return unless i2c_smbus_read_byte_data($file, 0x00) == 0x25;
return unless (i2c_smbus_read_byte_data($file, 0x03) & 0x80) == 0x00;
return (5); return (5);
} }