diff mbox

[4/4] Input: Synaptics: Add INPUT_PROP_SYNAPTICS_T3R2 property

Message ID 1307735704-30673-5-git-send-email-derek.foreman@collabora.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Derek Foreman June 10, 2011, 7:55 p.m. UTC
This new property indicates that the trackpad is able to track more than two contacts, but can only report the positions of two contacts due to bus bandwidth limitations.

Signed-off-by: Derek Foreman <derek.foreman@collabora.co.uk>
---
 drivers/input/mouse/synaptics.c |    3 +++
 include/linux/input.h           |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

Comments

Henrik Rydberg June 10, 2011, 9:13 p.m. UTC | #1
On Fri, Jun 10, 2011 at 03:55:04PM -0400, Derek Foreman wrote:
> This new property indicates that the trackpad is able to track more than two contacts, but can only report the positions of two contacts due to bus bandwidth limitations.
> 
> Signed-off-by: Derek Foreman <derek.foreman@collabora.co.uk>
> ---
>  drivers/input/mouse/synaptics.c |    3 +++
>  include/linux/input.h           |    1 +
>  2 files changed, 4 insertions(+), 0 deletions(-)

This information is already contained in INPUT_PROP_SEMI_MT, together
with the use of BTN_TRIPLETAP. Please check
Documentation/input/event-codes.txt for further details.

Thanks,
Henrik
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Derek Foreman June 13, 2011, 2:36 p.m. UTC | #2
On 06/10/11 17:13, Henrik Rydberg wrote:
> On Fri, Jun 10, 2011 at 03:55:04PM -0400, Derek Foreman wrote:
>> This new property indicates that the trackpad is able to track more than two contacts, but can only report the positions of two contacts due to bus bandwidth limitations.
>>
>> Signed-off-by: Derek Foreman<derek.foreman@collabora.co.uk>
>> ---
>>   drivers/input/mouse/synaptics.c |    3 +++
>>   include/linux/input.h           |    1 +
>>   2 files changed, 4 insertions(+), 0 deletions(-)
>
> This information is already contained in INPUT_PROP_SEMI_MT, together
> with the use of BTN_TRIPLETAP. Please check
> Documentation/input/event-codes.txt for further details.

I really sorry, but I don't understand how this provides the same 
information.

INPUT_PROP_SEMI_MT, at least according to input.h specifies that the 
device reports a rectangle only, and not accurate touch co-ordinates.

BTN_TOOL_TRIPLETAP indicates that there are 3 fingers on the pad.


My intent was to indicate to userspace that the device is reporting 
co-ordinates like certain synaptics devices do:

3 fingers are accurately tracked
2 fingers are accurately (not bounding box) reported

Further, all the idiosyncrasies of the synaptics method of reporting apply:
The device has 3 "slots" for tracking data, and once they are all 
filled, it reports slots 1 and 3.  If the slot 1 contact is lifted, 
slots 2 and 3 will report.  If a third finger is once again added to the 
pad, it will become the new slot 1.

INPUT_PROP_SEMI_MT is actually inaccurate for these devices, and in 
retrospect, the bounding box patch should have removed that bit from the 
properties of the devices it applies to.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 3c68663..a8ff669 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -701,6 +701,9 @@  static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
 
 	__set_bit(INPUT_PROP_POINTER, dev->propbit);
 
+	if (priv->use_bounding_box == 0)
+		__set_bit(INPUT_PROP_SYNAPTICS_T3R2, dev->propbit);
+
 	__set_bit(EV_ABS, dev->evbit);
 	input_set_abs_params(dev, ABS_X,
 			     XMIN_NOMINAL, priv->x_max ?: XMAX_NOMINAL, 0, 0);
diff --git a/include/linux/input.h b/include/linux/input.h
index 388cdef..b667e88 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -137,6 +137,7 @@  struct input_keymap_entry {
 #define INPUT_PROP_DIRECT		0x01	/* direct input devices */
 #define INPUT_PROP_BUTTONPAD		0x02	/* has button(s) under pad */
 #define INPUT_PROP_SEMI_MT		0x03	/* touch rectangle only */
+#define INPUT_PROP_SYNAPTICS_T3R2	0x04	/* synaptics track 3 report 2 */
 #define INPUT_PROP_INCONSISTENT_RATE	0x05	/* device report rate changes */
 
 #define INPUT_PROP_MAX			0x1f