Changes between Initial Version and Version 1 of linux/i2c


Ignore:
Timestamp:
10/31/2017 02:10:18 PM (11 months ago)
Author:
Tim Harvey
Comment:

restored from 2017-09-23 cache

Legend:

Unmodified
Added
Removed
Modified
  • linux/i2c

    v1 v1  
     1[[PageOutline]]
     2
     3= Linux I2C access =
     4You can not use standard read/write ioctl's on I2C devices because these devices do not pertain to a specific I2C slave device but instead an I2C controller.
     5
     6The Linux kernel API for i2c devices can be found here:
     7 * ​https://lxr.missinglinkelectronics.com/linux/include/uapi/linux/i2c-dev.h - ioctl API
     8​ * https://lxr.missinglinkelectronics.com/linux/Documentation/i2c/dev-interface - documentation
     9
     10For example code take a look at the i2cget source from the [https://github.com/suapapa/i2c-tools/blob/android/tools/i2cget.c ​i2c-tools package]. This source contains a commonly used userspace header file (i2c-dev.h) that provides i2c_smbus_* functions that you can use.