mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-01 06:45:24 +00:00
sensors-detect now use smbus_quick command for probes. sensors-detect
no longer tries to load i2c-proc. TODO list updates. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@504 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -970,7 +970,7 @@ sub scan_adapter
|
||||
i2c_set_slave_addr(\*FILE,$addr) or print("Can't set address to $_?!?\n"),
|
||||
next;
|
||||
|
||||
next unless i2c_smbus_read_byte(\*FILE) >= 0;
|
||||
next unless i2c_smbus_write_quick(\*FILE,$SMBUS_WRITE) >= 0;
|
||||
printf "Client found at address 0x%02x\n",$addr;
|
||||
|
||||
foreach $chip (@chip_ids) {
|
||||
@@ -1472,8 +1472,6 @@ sub generate_modprobes
|
||||
my $configfile = "";
|
||||
|
||||
# These are always needed
|
||||
$modprobes .= "# General I2C modules\n";
|
||||
$modprobes .= "modprobe i2c-proc\n";
|
||||
$configfile .= "# I2C module options\n";
|
||||
$configfile .= "alias char-major-89 i2c-dev\n";
|
||||
|
||||
@@ -1641,28 +1639,7 @@ sub main
|
||||
}
|
||||
}
|
||||
|
||||
print " To continue, we need modules `i2c-proc' and `i2c-dev' to be ",
|
||||
"loaded.\n";
|
||||
if (contains "i2c-proc", @modules_list) {
|
||||
print "i2c-proc is already loaded.\n";
|
||||
} else {
|
||||
if ($> != 0) {
|
||||
print " i2c-proc is not loaded, and you are not root. I can't ",
|
||||
"continue.\n";
|
||||
exit;
|
||||
} else {
|
||||
print " i2c-proc is not loaded. May I load it now? (YES/no): ";
|
||||
if (<STDIN> =~ /^\s*[Nn]/) {
|
||||
print " Sorry, in that case I can't continue.\n";
|
||||
exit;
|
||||
} elsif (system "modprobe","i2c-proc") {
|
||||
print " Loading failed ($!), aborting.\n";
|
||||
exit;
|
||||
} else {
|
||||
print " Module loaded succesfully.\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
print " To continue, we need module `i2c-dev' to be loaded.\n";
|
||||
if (contains "i2c-dev", @modules_list) {
|
||||
print "i2c-dev is already loaded.\n";
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user