24.1.2 I2C Device Driver Overview
The I2C device driver implements all the Linux I2C data structures that are required to
communicate with the I2C bus driver. It exposes a custom kernel space API to the other
device drivers to transfer data to the device that is connected to the I2C bus. Internally,
these API functions use the standard I2C kernel space API to call the I2C core module.
The I2C core module looks up the I2C bus driver and calls the appropriate function in the
I2C bus driver to transfer data. This driver provides the following functions to other
device drivers:
• Read function to read the device registers
• Write function to write to the device registers
The camera driver uses the APIs provided by this driver to interact with the camera.
24.1.3 Hardware Operation
The I2C module provides the functionality of a standard I2C master and slave.
It is designed to be compatible with the standard Philips I2C bus protocol. The module
supports up to 64 different clock frequencies that can be programmed by setting a value
to the Frequency Divider Register (IFDR). It also generates an interrupt when one of the
following occurs:
• One byte transfer is completed
• Address is received that matches its own specific address in slave-receive mode
• Arbitration is lost
24.2 Software Operation
The I2C driver for Linux has two parts: an I2C bus driver and an I2C chip driver.
Software Operation
i.MX 6SoloLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013
150
Freescale Semiconductor, Inc.