X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Documentation%2Fi2c%2Fdev-interface;h=09d6cda2a1fb6e57d68abb7ec2b7aa038c024da3;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=4fe882cb401eeb86e069693c9adf6a77ac37a7e2;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/Documentation/i2c/dev-interface b/Documentation/i2c/dev-interface index 4fe882cb4..09d6cda2a 100644 --- a/Documentation/i2c/dev-interface +++ b/Documentation/i2c/dev-interface @@ -3,7 +3,7 @@ possible to access all devices on an adapter from userspace, through the /dev interface. You need to load module i2c-dev for this. Each registered i2c adapter gets a number, counting from 0. You can -examine /proc/bus/i2c to see what number corresponds to which adapter. +examine /sys/class/i2c-dev/ to see what number corresponds to which adapter. I2C device files are character device files with major device number 89 and a minor device number corresponding to the number assigned as explained above. They should be called "i2c-%d" (i2c-0, i2c-1, ..., @@ -19,7 +19,7 @@ Yes, I know, you should never include kernel header files, but until glibc knows about i2c, there is not much choice. Now, you have to decide which adapter you want to access. You should -inspect /proc/bus/i2c to decide this. Adapter numbers are assigned +inspect /sys/class/i2c-dev/ to decide this. Adapter numbers are assigned somewhat dynamically, so you can not even assume /dev/i2c-0 is the first adapter.