summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2013-04-02 15:01:34 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2014-07-08 14:32:47 +0200
commit25be04f0f83263dac2c356065f756f0d51a3d62b (patch)
tree75f22cb5da78963a56254eb337b33156b618f2d4 /drivers
parent991fbb5a06fe23cc5de557d9c102ffbc72a5e21d (diff)
input: touchscreen: android ics fusion_F0710A driver variant
For Android use ICS variant of Fusion 7 and 10 multi-touch driver (See Fusion 7 and 10 drivers for Linux.pdf and Linux Drivers Fusion 10.zip). Tested to be working both with Android 4.0.4 for Colibri T20 as well as Android 4.2.1 for Colibri T30. (cherry picked from commit 0fc73eb175a82dc11f6c1cc8e03f1d311d3180de)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/touchscreen/fusion_F0710A.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/fusion_F0710A.c b/drivers/input/touchscreen/fusion_F0710A.c
index ac734abf5368..d29baf08de91 100644
--- a/drivers/input/touchscreen/fusion_F0710A.c
+++ b/drivers/input/touchscreen/fusion_F0710A.c
@@ -75,8 +75,12 @@ static int fusion_F0710A_register_input(void)
input_set_abs_params(dev, ABS_MT_POSITION_X, 0, fusion_F0710A.info.xres-1, 0, 0);
input_set_abs_params(dev, ABS_MT_POSITION_Y, 0, fusion_F0710A.info.yres-1, 0, 0);
+#ifdef CONFIG_ANDROID
+ input_set_abs_params(dev, ABS_MT_TRACKING_ID, 0, 15, 0, 0);
+#else
input_set_abs_params(dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
input_set_abs_params(dev, ABS_MT_WIDTH_MAJOR, 0, 15, 0, 0);
+#endif
ret = input_register_device(dev);
if (ret < 0)
@@ -220,6 +224,23 @@ static void fusion_F0710A_wq(struct work_struct *work)
}
}
+#ifdef CONFIG_ANDROID
+ if(z1)
+ {
+ input_report_abs(dev, ABS_MT_TRACKING_ID, 1);
+ input_report_abs(dev, ABS_MT_POSITION_X, x1);
+ input_report_abs(dev, ABS_MT_POSITION_Y, y1);
+ }
+ input_mt_sync(dev);
+
+ if(z2)
+ {
+ input_report_abs(dev, ABS_MT_TRACKING_ID, 2);
+ input_report_abs(dev, ABS_MT_POSITION_X, x2);
+ input_report_abs(dev, ABS_MT_POSITION_Y, y2);
+ }
+ input_mt_sync(dev);
+#else /* CONFIG_ANDROID */
input_report_abs(dev, ABS_MT_TOUCH_MAJOR, z1);
input_report_abs(dev, ABS_MT_WIDTH_MAJOR, 1);
input_report_abs(dev, ABS_MT_POSITION_X, x1);
@@ -230,6 +251,7 @@ static void fusion_F0710A_wq(struct work_struct *work)
input_report_abs(dev, ABS_MT_POSITION_X, x2);
input_report_abs(dev, ABS_MT_POSITION_Y, y2);
input_mt_sync(dev);
+#endif /* CONFIG_ANDROID */
input_sync(dev);