Lines Matching refs:I2C
2 Implementing I2C device drivers in userspace
5 Usually, I2C devices are controlled by a kernel driver. But it is also
9 Each registered I2C adapter gets a number, counting from 0. You can
12 I2C adapters present on your system at a given time. i2cdetect is part of
15 I2C device files are character device files with major device number 89
18 i2c-10, ...). All 256 minor device numbers are reserved for I2C.
24 So let's say you want to access an I2C adapter from a C program.
51 int addr = 0x40; /* The I2C address */
59 I2C to communicate with your device. SMBus commands are preferred if
69 /* ERROR HANDLING: I2C transaction failed */
75 * Using I2C Write, equivalent of
82 /* ERROR HANDLING: I2C transaction failed */
85 /* Using I2C Read, equivalent of i2c_smbus_read_byte(file) */
87 /* ERROR HANDLING: I2C transaction failed */
92 Note that only a subset of the I2C and SMBus protocols can be achieved by
147 You can do plain I2C transactions by using read(2) and write(2) calls.
183 when you use the /dev interface to I2C:
190 respectively. You can think of i2c-dev as a generic I2C chip driver
199 i2c-dev. Examples include I2C_FUNCS, which queries the I2C adapter
206 and calls that would have been performed by kernel I2C chip drivers
207 directly. This means that I2C bus drivers don't need to implement
211 your I2C bus driver. Each adapter must declare callback functions
219 After your I2C bus driver has processed these requests, execution runs