Good set of documentation with examples: http://elinux.org/Interfacing_with_I2C_Devices http://lxr.free-electrons.com/source/Documentation/i2c/dev-interface