Linux Deployment
7.1
I2C Driver
The Linux has already included the driver of I2C bus. The device can be accessed through
the file: /dev/i2c-0 /dev/i2c-1
[root@COMX-P2020 /]# ls /dev/i2c*
/dev/i2c-0 /dev/i2c-1
7.2
Detect I2C Device
The application "i2cdetect" can be used to detect the devices on the i2c bus.
To Detect the devices on I2C bus 0:
[root@COMX-P2020 /]# /usr/sbin/i2cdetect 0
WARNING! This program can confuse your I2C bus, cause data
loss and worse!
I will probe file /dev/i2c-0.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
00:
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --
[root@COMX-P2020 /]#
To Detect the devices on I2C bus 1:
[root@COMX-P2020 /]# /usr/sbin/i2cdetect 1
WARNING! This program can confuse your I2C bus, cause data
loss and worse!
I will probe file /dev/i2c-1.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
COMX-P2020 BSP User Guide (6806800L84C)
0 1
2 3
4 5
6 7 8
-- -- -- -- -- -- -- -- -- -- -- -- --
0 1
2 3
4 5
6 7 8
9 a b c
d e f
9 a b c
d e f
Chapter 7
93
Need help?
Do you have a question about the COMX-P2020 BSP and is the answer not in the manual?