Sysfs Interface - atmel-maxtouch/mxt-app GitHub Wiki
Sysfs Interface
The sysfs interface is used in conjunction with the Linux kernel driver. It accesses sysfs attributes under the following directories:
I2C
/sys/bus/i2c/drivers/dddddddd/b-00xx/
SPI
/sys/bus/spi/drivers/dddddddd/spib-x/
Where
d : driver name – atmel_mxt_ts, mchp_spi_ts, or mchp_mtch
b : I2C adapter bus number
spi-b : SPI bus number
xx : I2C address of device
x : Chip select for SPI device
The sysfs attributes used under this directory to interface to the device are the following
mem_access : Access to raw I2C and SPI address space using read/write command within the driver
debug_enable : Output messages from the device to dmesg log as hexadecimal, if enabled. By default, unknown
messages not specified by the driver are also dumped into dmesg logs.
debug_v2_enable, debug_msg, debug_notify : Optional improved binary interface to retrieve messages. Maximum
number of messages held in buffer is 200.
By default the maXTouch or MTCH device will be found by auto scanning for the slave address.
If a specific device is needed, the examples below show how to specify a particular device using the sysfs interface:
EXAMPLE: Find specific I2C device on bus adapter #1 at slave address 0x4b
./mxt-app -d sysfs_i2c:1-004b
EXAMPLE: Find a specific SPI device on bus adapter #1 on chip select #3
./mxt-app -d sysfs_spi:1-3
For the MTCH device, a special --driver DRIVER argument is required.
EXAMPLE: Find a MTCH device using auto scan.
./mxt-app --driver mtch