[i2c] Simple read byte data compilation problem

Fabien Marteau fabien.marteau at laposte.net
Tue Oct 21 18:10:36 CEST 2008

> Documentation/i2c/dev-interface says:
> So let's say you want to access an i2c adapter from a C program. The
> first thing to do is "#include <linux/i2c-dev.h>". 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 i2c-tools and is
> meant to be included from user-space programs. You obviously want
> the second one here.

> Apparently you missed this paragraph.

Yes, in fact I looked for i2c-dev.h in the wrong  tree (lm-sensor). I
realize that they are i2c-tools special tree for this. That work fine know.

Thank you

> As a side note, if you only need to test your bus driver, the
> i2cdetect, i2cget, i2cset and i2cdump utilities from the i2c-tools
> package should be a good start, maybe you don't need to write your own
> utility.
> --
> Jean Delvare
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.lm-sensors.org/pipermail/i2c/attachments/20081021/50dd6075/attachment.html 

More information about the i2c mailing list