[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1292361672-2581-5-git-send-email-chase.douglas@canonical.com>
Date: Tue, 14 Dec 2010 13:21:12 -0800
From: Chase Douglas <chase.douglas@...onical.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Henrik Rydberg <rydberg@...omail.se>
Cc: Chris Bagwell <chris@...bagwell.com>,
Peter Hutterer <peter.hutterer@...-t.net>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 4/4] Input: synaptics - Add support for ABS_RECT_*
Add support for partial multitouch support through the ABS_RECT_* evdev
codes.
Signed-off-by: Chase Douglas <chase.douglas@...onical.com>
---
drivers/input/mouse/synaptics.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 2e300a4..7cebdce 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -525,6 +525,13 @@ static void synaptics_process_packet(struct psmouse *psmouse)
}
input_report_abs(dev, ABS_PRESSURE, hw.z);
+ if (priv->multitouch && num_fingers >= 2) {
+ input_report_abs(dev, ABS_RECT_MIN_X, min(hw.x, priv->mt.x));
+ input_report_abs(dev, ABS_RECT_MAX_X, max(hw.x, priv->mt.x));
+ input_report_abs(dev, ABS_RECT_MIN_Y, min(hw.y, priv->mt.y));
+ input_report_abs(dev, ABS_RECT_MAX_Y, max(hw.y, priv->mt.y));
+ }
+
if (SYN_CAP_PALMDETECT(priv->capabilities))
input_report_abs(dev, ABS_TOOL_WIDTH, finger_width);
@@ -667,6 +674,17 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
__clear_bit(BTN_RIGHT, dev->keybit);
__clear_bit(BTN_MIDDLE, dev->keybit);
}
+
+ if (priv->multitouch) {
+ input_set_abs_params(dev, ABS_RECT_MIN_X, XMIN_NOMINAL,
+ priv->x_max ?: XMAX_NOMINAL, 0, 0);
+ input_set_abs_params(dev, ABS_RECT_MAX_X, XMIN_NOMINAL,
+ priv->x_max ?: XMAX_NOMINAL, 0, 0);
+ input_set_abs_params(dev, ABS_RECT_MIN_Y, YMIN_NOMINAL,
+ priv->y_max ?: YMAX_NOMINAL, 0, 0);
+ input_set_abs_params(dev, ABS_RECT_MAX_Y, YMIN_NOMINAL,
+ priv->y_max ?: YMAX_NOMINAL, 0, 0);
+ }
}
static void synaptics_disconnect(struct psmouse *psmouse)
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists