diff --git a/doc/modules b/doc/modules index dbc40340..2e84f7d8 100644 --- a/doc/modules +++ b/doc/modules @@ -33,6 +33,10 @@ enter at the insmod command, in the configuration file. The syntax is as follows: options i2c-core debug=2 +Finally, it is possible to auto-load the i2c-dev module if a /dev/i2c-* +file is accessed. You need the following line in the configuration file: + alias char-major-89 i2c-dev + With the above, the managing of all those modules is suddenly no problem at all! @@ -45,6 +49,9 @@ at all! (src) i2c-proc: i2c-core Creates /proc/bus/i2c* files. +(src) i2c-dev: smbus i2c-core + Grants access to /dev/i2c-* files + (src) smbus: i2c-core SMBus emulation on i2c busses. Base algorithm, on which SMBus-only adapters rely. diff --git a/doc/progs b/doc/progs index 8b31e4f2..21c314d1 100644 --- a/doc/progs +++ b/doc/progs @@ -7,6 +7,13 @@ this package. file. It read /proc/bus/i2c (or the file specified on the command-line), and prints to stdout `bus' statements reflecting the currently detected adapters. +* prog/dump/i2cdump (written in C, not installed) + This program helps to dump the registers of a I2C device that understands + the 'byte data' or 'word data' SMBus protocols. Usual syntax: + ./i2cdump 0 0x49 b + Here the '0' stands for i2c-0 (check /proc/bus/i2c to find out which bus + you need), '0x49' is the device address, and 'b' or 'w' stands for byte + or word data. * prog/dump/isadump (written in C, not installed) This program helps to dump the registers of LM78-like chips, or more exactly, chips which use an I/O-port for its address and one as its @@ -16,6 +23,9 @@ this package. This program decodes the information generated by the `eeprom.o' module. It will only work for the installed eeprom module from the src/ directory, not for the old one in the i2c/drivers/ directory. +* prog/mkdev/mkdev.sh (written in bash, not installed) + This script creates the /dev/i2c-* files. Please check the source before + you run it, as you may need to set some variables first. * prog/sensors/sensors (written in C, installed by `make install') This pretty-prints the information provided by the modules. It is a normal console application, using stdin and stdout. It is essential, because diff --git a/prog/dump/i2cdump.c b/prog/dump/i2cdump.c index 7de1e230..ebbdd571 100644 --- a/prog/dump/i2cdump.c +++ b/prog/dump/i2cdump.c @@ -97,7 +97,7 @@ int main(int argc, char *argv[]) fprintf(stderr," WARNING! This program can confuse your I2C bus, " "cause data loss and worse!\n"); - fprintf(stderr," I will probe file %s, address %x, mode %s\n", + fprintf(stderr," I will probe file %s, address 0x%x, mode %s\n", filename,address,size == SMBUS_BYTE_DATA?"byte":"word"); fprintf(stderr," You have five seconds to reconsider and press CTRL-C!\n\n"); sleep(5);