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 or mchip_spi_ts
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.

The following are examples on how to specify a particular device found over 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