Skip to content

Loading Touch Driver as a Module

atmeltouchlab edited this page Apr 16, 2019 · 2 revisions

Loading the Touch Driver as a Module

The touch driver can be configured to be built in with the kernel image or as a module to be loaded later.

Note that if the maXTouch device configuration is to be loaded on a driver probe, the driver must be compiled as a module

Before the kernel is built, the defconfig file should be modified to create a driver module (atmel_mst_ts.ko):

CONFIG_TOUCHSCREEN_ATMEL_MXT=m

After the driver module is built, the user can install the module using the following command:

insmod /sys/lib/modules/atmel_mxt_ts.ko

The following commands can be used to ensure the correct permissions are set up for the driver module once it is installed:

chmod 0777 /sys/bus/i2c/drivers/atmel_mxt_ts/1-004b/debug_enable
chmod 0777 /sys/bus/i2c/drivers/atmel_mxt_ts/1-004b/mem_access
write /proc/sys/kernel/dmesg_restrict 0

The chmod and dmesg_restrict lines are used to allow debug access to the chip during integration and debugging.

Permissions should be restored for production unless debug access is required at all times.

Clone this wiki locally