[kernel] r16677 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/features/all patches/series
Ben Hutchings
benh at alioth.debian.org
Tue Dec 7 04:23:29 UTC 2010
Author: benh
Date: Tue Dec 7 04:23:20 2010
New Revision: 16677
Log:
bcm5974: Add reporting of multitouch events (Closes: #605450)
Added:
dists/sid/linux-2.6/debian/patches/bugfix/all/bcm5974-adjust-major-minor-to-scale.patch
dists/sid/linux-2.6/debian/patches/features/all/bcm5974-report-ABS_MT-events.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/29
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Mon Dec 6 22:18:08 2010 (r16676)
+++ dists/sid/linux-2.6/debian/changelog Tue Dec 7 04:23:20 2010 (r16677)
@@ -19,6 +19,7 @@
- resource: Add shared I/O region support
- hwmon: f71882fg: Use a muxed resource lock for the Super I/O port
- watchdog: Add f71808e_wdt driver
+ * bcm5974: Add reporting of multitouch events (Closes: #605450)
[ dann frazier ]
* net: clear heap allocation for ETHTOOL_GRXCLSRLALL (CVE-2010-3861)
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/bcm5974-adjust-major-minor-to-scale.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/bcm5974-adjust-major-minor-to-scale.patch Tue Dec 7 04:23:20 2010 (r16677)
@@ -0,0 +1,42 @@
+From: Henrik Rydberg <rydberg at euromail.se>
+Date: Tue, 31 Aug 2010 17:27:02 -0700
+Subject: [PATCH 2/2] Input: bcm5974 - adjust major/minor to scale
+
+commit 57157becdd1d23e6c2b8661ffe6c78d7d605d121 upstream.
+
+By visual inspection, the reported touch_major and touch_minor axes
+are a factor of two too small. Presumably the device actually reports
+the semi-major and semi-minor axes. Corrected with this patch.
+
+Signed-off-by: Henrik Rydberg <rydberg at euromail.se>
+Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
+---
+ drivers/input/mouse/bcm5974.c | 12 ++++++++----
+ 1 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
+index ea67c49..b952317 100644
+--- a/drivers/input/mouse/bcm5974.c
++++ b/drivers/input/mouse/bcm5974.c
+@@ -337,10 +337,14 @@ static void report_finger_data(struct input_dev *input,
+ const struct bcm5974_config *cfg,
+ const struct tp_finger *f)
+ {
+- input_report_abs(input, ABS_MT_TOUCH_MAJOR, raw2int(f->force_major));
+- input_report_abs(input, ABS_MT_TOUCH_MINOR, raw2int(f->force_minor));
+- input_report_abs(input, ABS_MT_WIDTH_MAJOR, raw2int(f->size_major));
+- input_report_abs(input, ABS_MT_WIDTH_MINOR, raw2int(f->size_minor));
++ input_report_abs(input, ABS_MT_TOUCH_MAJOR,
++ raw2int(f->force_major) << 1);
++ input_report_abs(input, ABS_MT_TOUCH_MINOR,
++ raw2int(f->force_minor) << 1);
++ input_report_abs(input, ABS_MT_WIDTH_MAJOR,
++ raw2int(f->size_major) << 1);
++ input_report_abs(input, ABS_MT_WIDTH_MINOR,
++ raw2int(f->size_minor) << 1);
+ input_report_abs(input, ABS_MT_ORIENTATION,
+ MAX_FINGER_ORIENTATION - raw2int(f->orientation));
+ input_report_abs(input, ABS_MT_POSITION_X, raw2int(f->abs_x));
+--
+1.7.2.3
+
Added: dists/sid/linux-2.6/debian/patches/features/all/bcm5974-report-ABS_MT-events.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/features/all/bcm5974-report-ABS_MT-events.patch Tue Dec 7 04:23:20 2010 (r16677)
@@ -0,0 +1,101 @@
+From: Henrik Rydberg <rydberg at euromail.se>
+Date: Wed, 6 Jan 2010 00:32:48 -0800
+Subject: [PATCH 1/2] Input: bcm5974 - report ABS_MT events
+
+commit 6f2701b79f2ee0c5eb946e8a87993acbe8041da3 upstream.
+
+Make bcm5974 report raw multi-touch (MT) data in the form of ABS_MT events.
+
+[dtor at mail.ru: get rid of module option, always report all events]
+Signed-off-by: Henrik Rydberg <rydberg at euromail.se>
+Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
+Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
+---
+ drivers/input/mouse/bcm5974.c | 44 ++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 43 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
+index 0d1d334..4f8fe08 100644
+--- a/drivers/input/mouse/bcm5974.c
++++ b/drivers/input/mouse/bcm5974.c
+@@ -139,6 +139,7 @@ struct tp_finger {
+ /* trackpad finger data size, empirically at least ten fingers */
+ #define SIZEOF_FINGER sizeof(struct tp_finger)
+ #define SIZEOF_ALL_FINGERS (16 * SIZEOF_FINGER)
++#define MAX_FINGER_ORIENTATION 16384
+
+ /* device-specific parameters */
+ struct bcm5974_param {
+@@ -284,6 +285,26 @@ static void setup_events_to_report(struct input_dev *input_dev,
+ input_set_abs_params(input_dev, ABS_Y,
+ 0, cfg->y.dim, cfg->y.fuzz, 0);
+
++ /* finger touch area */
++ input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR,
++ cfg->w.devmin, cfg->w.devmax, 0, 0);
++ input_set_abs_params(input_dev, ABS_MT_TOUCH_MINOR,
++ cfg->w.devmin, cfg->w.devmax, 0, 0);
++ /* finger approach area */
++ input_set_abs_params(input_dev, ABS_MT_WIDTH_MAJOR,
++ cfg->w.devmin, cfg->w.devmax, 0, 0);
++ input_set_abs_params(input_dev, ABS_MT_WIDTH_MINOR,
++ cfg->w.devmin, cfg->w.devmax, 0, 0);
++ /* finger orientation */
++ input_set_abs_params(input_dev, ABS_MT_ORIENTATION,
++ -MAX_FINGER_ORIENTATION,
++ MAX_FINGER_ORIENTATION, 0, 0);
++ /* finger position */
++ input_set_abs_params(input_dev, ABS_MT_POSITION_X,
++ cfg->x.devmin, cfg->x.devmax, 0, 0);
++ input_set_abs_params(input_dev, ABS_MT_POSITION_Y,
++ cfg->y.devmin, cfg->y.devmax, 0, 0);
++
+ __set_bit(EV_KEY, input_dev->evbit);
+ __set_bit(BTN_TOUCH, input_dev->keybit);
+ __set_bit(BTN_TOOL_FINGER, input_dev->keybit);
+@@ -310,13 +331,29 @@ static int report_bt_state(struct bcm5974 *dev, int size)
+ return 0;
+ }
+
++static void report_finger_data(struct input_dev *input,
++ const struct bcm5974_config *cfg,
++ const struct tp_finger *f)
++{
++ input_report_abs(input, ABS_MT_TOUCH_MAJOR, raw2int(f->force_major));
++ input_report_abs(input, ABS_MT_TOUCH_MINOR, raw2int(f->force_minor));
++ input_report_abs(input, ABS_MT_WIDTH_MAJOR, raw2int(f->size_major));
++ input_report_abs(input, ABS_MT_WIDTH_MINOR, raw2int(f->size_minor));
++ input_report_abs(input, ABS_MT_ORIENTATION,
++ MAX_FINGER_ORIENTATION - raw2int(f->orientation));
++ input_report_abs(input, ABS_MT_POSITION_X, raw2int(f->abs_x));
++ input_report_abs(input, ABS_MT_POSITION_Y,
++ cfg->y.devmin + cfg->y.devmax - raw2int(f->abs_y));
++ input_mt_sync(input);
++}
++
+ /* report trackpad data as logical trackpad state */
+ static int report_tp_state(struct bcm5974 *dev, int size)
+ {
+ const struct bcm5974_config *c = &dev->cfg;
+ const struct tp_finger *f;
+ struct input_dev *input = dev->input;
+- int raw_p, raw_w, raw_x, raw_y, raw_n;
++ int raw_p, raw_w, raw_x, raw_y, raw_n, i;
+ int ptest, origin, ibt = 0, nmin = 0, nmax = 0;
+ int abs_p = 0, abs_w = 0, abs_x = 0, abs_y = 0;
+
+@@ -329,6 +366,11 @@ static int report_tp_state(struct bcm5974 *dev, int size)
+
+ /* always track the first finger; when detached, start over */
+ if (raw_n) {
++
++ /* report raw trackpad data */
++ for (i = 0; i < raw_n; i++)
++ report_finger_data(input, c, &f[i]);
++
+ raw_p = raw2int(f->force_major);
+ raw_w = raw2int(f->size_major);
+ raw_x = raw2int(f->abs_x);
+--
+1.7.2.3
+
Modified: dists/sid/linux-2.6/debian/patches/series/29
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/29 Mon Dec 6 22:18:08 2010 (r16676)
+++ dists/sid/linux-2.6/debian/patches/series/29 Tue Dec 7 04:23:20 2010 (r16677)
@@ -16,3 +16,5 @@
+ features/all/f71882fg-use-a-muxed-resource-lock-for-the-Sup.patch
+ features/all/watchdog-f71808e_wdt-driver-for-Fintek-F718108E-F71882FG.patch
+ features/arm/ts-plus.patch
++ features/all/bcm5974-report-ABS_MT-events.patch
++ bugfix/all/bcm5974-adjust-major-minor-to-scale.patch
More information about the Kernel-svn-changes
mailing list