Skip to content

maXTouch SPI Linux Driver

mgong98 edited this page Sep 23, 2021 · 3 revisions

SPI Driver - mchp_spi_ts.c

The mchp_spi_ts.c Linux driver provides users with an alternative high speed interface to communicate with the maXTouch touchscreen controllers. It is in the /driver/input/touchscreen/ directory of the Linux kernel.

The main purpose of the maXTouch SPI Linux driver is to read touch events from the input device and transfer the data to the Linux input subsystem. Event handlers distribute the events from the device, typically to userspace applications that use the information to determine the location of the touch.

Events are generated when a user touches the touchscreen and interrupts are sent to the MPU. These interrupts are received by the touch driver, which then initiates a read from the input device. Events can come from a finger, stylus, glove or even a hovering object.

With maXTouch devices that have a dual interface, the SPI can either be primary or secondary (depends on the chip, refer to the protocol guide for details). In the case where the SPI is secondary, restrictions will exist in terms of reprogramming. Only the primary interface on these chips will be allowed to reprogram the chip.

For debugging purposes, the input touch driver uses the sysfs filesystem to provide an interface to the kernel by creating sysfs files within userspace. These files can be used to support firmware or configuration updates. The userspace application mxt-app can also provide additional information about the input device through raw data dumps, enabling self-test features and through touch message debug dumps.

Clone this wiki locally