Re: [PATCH v2] Input: synaptics - use firmware data for Cr-48

From: Chase Douglas
Date: Wed Jul 18 2012 - 11:38:22 EST

On 07/18/2012 03:22 AM, Chung-yih Wang wrote:
The profile sensor clickpad in a Cr-48 Chromebook does a reasonable job of
tracking individual fingers. This tracking isn't perfect, but, experiments
show that it works better than just passing "semi-mt" data to userspace,
and making userspace try to deduce where the fingers are given a bounding box.

This patch tries to report correct two-finger positions instead of the
{(min_x, min_y), (max_x, max_y)} for profile sensor clickpads on Cr-48
chromebooks. Note that this device's firmware always reports the higher
(smaller y) finger in the "sgm" packet, and the lower (larger y) finger in the
"agm" packet. Thus, when a new finger arrives on the pad, the kernel driver
uses a simple Euclidean distance measure to deduce which of the two new fingers
should keep the tracking ID of the previous single finger. Similarly, when one
finger is removed, the same measure is used to determine which finger remained
on the pad.

Can it keep track of the touches as you rotate them past each other in both the X and Y axes? If not, then it should remain a semi-mt device. Even if you can guess which touch is which when a second touch is added, you will lose track of it when the user attempts to perform a rotation.

Semi-mt is our only mechanism for telling userspace that the device can't accurately tell us about rotations. We could create a new device property to say: "This device kinda sorta tells us enough info usually to know where two touches are initially." I don't think the effort is worth it though. What is the point of providing the exact locations on a trackpad if they can't be used for rotation?

-- Chase
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at