-
Notifications
You must be signed in to change notification settings - Fork 58
I2C Debug Interface
Devices can be assessed directly via the i2c-dev debug interface by giving location information on the command line.
The i2c-dev interface is documented in the Linux kernel source in the /Documentation/i2c/dev-interface directory.
The I2C debug interface support must be enabled using the CONFIG_I2C_CHARDEV kernel configuration option. It is enabled on a system if the file directory /dev/i2c-* is present.
To use i2c-dev, provide a DEVICESTRING such as -d i2c-dev:1-004a to access a device on Bus 1, slave address 0x4a through I2C.
Messages for the maXTouch devices are read in i2c-dev mode, by polling for available messages. If a kernel touch driver is also present on the system, reading messages on interrupt, then no messages will be received by themxt-app. To prevent this conflict, the recommendation is to disable the maXTouch Linux driver.
EXAMPLE: Unbind the driver
echo -n “1-004a” > ./unbind /* Done under the /sys/bus/i2c/drivers/atmel_mxt_ts/ directory */
Another workaround is to set the T18.COMMAND (byte 1) to 2 “Force the /CHG line high (inactive)” so the kernel driver does not receive interrupts.
There is no scanning support for I2C. This is because reading from every possible maXTouch address on every I2C bus might adversely affect some unrelated hardware that does not understand Object Protocol. You must manually identify the correct adapter and address by referencing the protocol guide or hardware schematic to fill in the DEVICESTRING option with the correct bus# and slave address.
The i2c-dev interface is used with the –flash command to access a device for firmware update or to access the device already in bootloader mode.