Changeset 2782
- Timestamp:
- 12/03/04 23:33:56 (8 years ago)
- Files:
-
- 1 modified
-
lm-sensors/trunk/prog/eeprom/decode-vaio.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/prog/eeprom/decode-vaio.pl
r2513 r2782 38 38 # Version 1.1 2004-01-17 Jean Delvare <khali@linux-fr.org> 39 39 # Added support for Linux 2.5/2.6 (i.e. sysfs). 40 # Version 1.1 2004-11-28 Jean Delvare <khali@linux-fr.org> 41 # Support bus number 0 to 4 instead of only 0. 40 42 # 41 43 # EEPROM data decoding for Sony Vaio laptops. … … 72 74 use strict; 73 75 use Fcntl qw(:DEFAULT :seek); 74 use vars qw($sysfs );76 use vars qw($sysfs $found); 75 77 76 78 sub print_item … … 189 191 print("Copyright (c) 2002-2004 Jean Delvare\n"); 190 192 print("Version 1.1\n\n"); 191 192 $sysfs = 0;193 193 } 194 194 … … 198 198 } 199 199 200 if (-r '/proc/sys/dev/sensors/eeprom-i2c-0-57') 201 { 202 if (-r '/proc/sys/dev/sensors/eeprom-i2c-0-57/data0-15') 203 { 204 print("Deprecated old interface found. Please upgrade to lm_sensors 2.6.3 or greater."); 205 } 206 else 207 { 208 vaio_decode('0', '57'); 209 } 210 } 211 elsif (-r '/sys/bus/i2c/devices/0-0057/eeprom') 212 { 213 $sysfs = 1; 214 vaio_decode('0', '57'); 215 } 216 else 200 for (my $i = 0, $found=0; $i <= 4 && !$found; $i++) 201 { 202 if (-r "/sys/bus/i2c/devices/$i-0057/eeprom") 203 { 204 $sysfs = 1; 205 vaio_decode($i, '57'); 206 $found++; 207 } 208 elsif (-r "/proc/sys/dev/sensors/eeprom-i2c-$i-57") 209 { 210 if (-r "/proc/sys/dev/sensors/eeprom-i2c-$i-57/data0-15") 211 { 212 print("Deprecated old interface found. Please upgrade to lm_sensors 2.6.3 or greater."); 213 exit; 214 } 215 else 216 { 217 $sysfs = 0; 218 vaio_decode($i, '57'); 219 $found++; 220 } 221 } 222 } 223 224 if (!$found) 217 225 { 218 226 print("Vaio EEPROM not found. Please make sure that the eeprom module is loaded.\n");
