From c2355db1a238a30bb424f33bd2116770b799fcbd Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Sat, 25 Jun 2005 11:37:40 +0200 Subject: [PATCH] --- yaml --- r: 4653 b: refs/heads/master c: 1d772e2587da3c8b0fb8610fcc1c91fd82f87e52 h: refs/heads/master i: 4651: 71eafb0d06f29c50cf0c5d7e0e6c791c105d2ee7 v: v3 --- [refs] | 2 +- trunk/Documentation/i2c/dev-interface | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index ae92a0abe29f..4bcf97212db4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a68e2f4895070f3a449bfe5ae1174b73cc900642 +refs/heads/master: 1d772e2587da3c8b0fb8610fcc1c91fd82f87e52 diff --git a/trunk/Documentation/i2c/dev-interface b/trunk/Documentation/i2c/dev-interface index a78ea62506ee..b849ad636583 100644 --- a/trunk/Documentation/i2c/dev-interface +++ b/trunk/Documentation/i2c/dev-interface @@ -14,9 +14,12 @@ C example ========= So let's say you want to access an i2c adapter from a C program. The -first thing to do is `#include " and "#include . -Yes, I know, you should never include kernel header files, but until glibc -knows about i2c, there is not much choice. +first thing to do is "#include ". Please note that +there are two files named "i2c-dev.h" out there, one is distributed +with the Linux kernel and is meant to be included from kernel +driver code, the other one is distributed with lm_sensors and is +meant to be included from user-space programs. You obviously want +the second one here. Now, you have to decide which adapter you want to access. You should inspect /sys/class/i2c-dev/ to decide this. Adapter numbers are assigned @@ -78,7 +81,7 @@ Full interface description ========================== The following IOCTLs are defined and fully supported -(see also i2c-dev.h and i2c.h): +(see also i2c-dev.h): ioctl(file,I2C_SLAVE,long addr) Change slave address. The address is passed in the 7 lower bits of the