The I2C tools
This are stored into the package i2c-tools and they are a set of utility programs we can use to easily manipulate an I2C device in user-space. They rely on the I2C /dev interface driver stored into the file drivers/i2c/i2c-dev.c in the Linux's sources repository tree.
Note
See the file Documentation/i2c/dev-interface into the Kernel's repository for further information about this special driver.
If our device is not managed by the kernel, that is, if we have not defined any driver that actually control it we can use the above driver with the followings utilities to get access to its registers.
First of all we can use the i2cdetect command to get a list of all available I2C buses. For instance on the Wandboard we get the following:
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access