-
Notifications
You must be signed in to change notification settings - Fork 59
Debug Interface
A sysfs interface has been added to the atmel_mxt_ts
driver to
provide an API for user space utilities. The interface is provided as a
series of files under the sysfs filesystem.
The files should be in the location:
/sys/bus/i2c/drivers/dddddddd/b-00xx/
Where:
d : Name of the driver. For instance, "qt602240_ts", "Atmel MXT224", "Atmel MXT540E", "Atmel MXT768E", "atmel_mxt_ts", "sec_touch", "maXTouch", etc.
b : i2c adapter
The interface is provided as sysfs attributes under this directory.
This interface outputs messages from the maXTouch message processor read in the IRQ handler, and prefixed with "MXT MSG", to the kernel dmesg ring buffer.
All are output as ASCII hexadecimal bytes, separated by spaces.
To enable, type following command under /sys/bus/i2c/drivers/dddddddd/b-00xx/ directory of the target device:
echo "1" > debug_enable
To disable:
echo "0" > debug_enable
Contents of the “dmesg” ring buffer can be fetched using “dmesg” command on console.
Under Android Jelly Bean, access to dmesg logs is restricted (dmesg_restrict), this may be disabled temporarily for debug purposes by executing
echo 0 > /proc/sys/kernel/dmesg_restrict
On some devices, SELinux may prevent access to dmesg.
This is a sysfs binary attribute, which gives access to the I2C address space for loading configuration settings.
Driver releases after maxtouch-v3.0-20130628
support an enhanced
interface for MSG debug output. This comprises the following sysfs
attributes:
debug_v2_enable
debug_notify
-
debug_msg
(binary attribute)
It does not use dmesg. The interface is enabled using debug_v2_enable
.
Messages can be read from debug_msg
binary attribute. The debug_notify
attribute can be polled synchronously.
This interface is supported by mxt-app versions after v1.10.