]> code.ossystems Code Review - meta-freescale.git/commitdiff
linux-imx_3.0.35: Enables eGalax touchscreen on i.MX6Q Sabre machines
authorLeonardo Sandoval <leonardo.sandoval@freescale.com>
Fri, 18 Jan 2013 22:01:59 +0000 (16:01 -0600)
committerOtavio Salvador <otavio@ossystems.com.br>
Fri, 18 Jan 2013 23:09:34 +0000 (21:09 -0200)
Enables the touchscreen functionality on i.MX6 Sabre Platforms using
the eGalax Driver. Tested on imx6qsabresd and imxqsabreauto machines.

[YOCTO #3573]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval@freescale.com>
Suggested-by: Eric Nelson <eric.nelson@boundarydevices.com>
meta-fsl-arm/recipes-kernel/linux/linux-imx/egalax_ts-Add-support-for-single-touch-in-Kconfig.patch [new file with mode: 0644]
meta-fsl-arm/recipes-kernel/linux/linux-imx_3.0.35.bb

diff --git a/meta-fsl-arm/recipes-kernel/linux/linux-imx/egalax_ts-Add-support-for-single-touch-in-Kconfig.patch b/meta-fsl-arm/recipes-kernel/linux/linux-imx/egalax_ts-Add-support-for-single-touch-in-Kconfig.patch
new file mode 100644 (file)
index 0000000..33a8393
--- /dev/null
@@ -0,0 +1,68 @@
+From f6b560538edca833481c1d67ecf3cfe2d65c4018 Mon Sep 17 00:00:00 2001
+From: Eric Nelson <eric.nelson@boundarydevices.com>
+Date: Wed, 29 Aug 2012 21:50:30 -0700
+Subject: [PATCH] egalax_ts: Add support for single-touch in Kconfig
+
+Upstream-Status: Pending
+---
+ drivers/input/touchscreen/Kconfig     |   10 ++++++++++
+ drivers/input/touchscreen/egalax_ts.c |    7 ++++---
+ 2 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
+index c00ab79..311bd4d 100644
+--- a/drivers/input/touchscreen/Kconfig
++++ b/drivers/input/touchscreen/Kconfig
+@@ -199,6 +199,16 @@ config TOUCHSCREEN_ELAN
+         To compile this driver as a module, choose M here: the
+         module will be called elan-touch.
++config TOUCHSCREEN_EGALAX_SINGLE_TOUCH
++      bool "EETI eGalax touchscreen as single-touch"
++      default N
++      depends on TOUCHSCREEN_EGALAX
++      help
++        If you say yes here you get single-touch touchscreen support
++        on the eGalax I2C controller.
++        If you say "no", you'll get the normal multi-touch.
++
++
+ config TOUCHSCREEN_FUJITSU
+       tristate "Fujitsu serial touchscreen"
+       select SERIO
+diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c
+index fff8afe..0b6cde7 100644
+--- a/drivers/input/touchscreen/egalax_ts.c
++++ b/drivers/input/touchscreen/egalax_ts.c
+@@ -139,7 +139,7 @@ retry:
+               events[id].x = x;
+               events[id].y = y;
+-#ifdef FORCE_SINGLE_POINTER_SUPPORT
++#ifdef CONFIG_TOUCHSCREEN_EGALAX_SINGLE_TOUCH
+               input_report_abs(input_dev, ABS_X, x);
+               input_report_abs(input_dev, ABS_Y, y);
+               input_event(data->input_dev, EV_KEY, BTN_TOUCH, 1);
+@@ -166,7 +166,7 @@ retry:
+               dev_dbg(&client->dev, "release id:%d\n", id);
+               events[id].valid = 0;
+               events[id].status = 0;
+-#ifdef FORCE_SINGLE_POINTER_SUPPORT
++#ifdef CONFIG_TOUCHSCREEN_EGALAX_SINGLE_TOUCH
+               input_report_key(input_dev, BTN_TOUCH, 0);
+               input_report_abs(input_dev, ABS_PRESSURE, 0);
+ #else
+@@ -256,8 +256,9 @@ static int __devinit egalax_ts_probe(struct i2c_client *client,
+       __set_bit(ABS_PRESSURE, input_dev->absbit);
+       input_set_abs_params(input_dev, ABS_X, 0, 32767, 0, 0);
+       input_set_abs_params(input_dev, ABS_Y, 0, 32767, 0, 0);
++      input_set_abs_params(input_dev, ABS_PRESSURE, 0, 1, 0, 0);
+-#ifndef FORCE_SINGLE_POINTER_SUPPORT
++#ifndef CONFIG_TOUCHSCREEN_EGALAX_SINGLE_TOUCH
+       input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, 32767, 0, 0);
+       input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, 32767, 0, 0);
+       input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
+-- 
+1.7.9.5
+
index 9f1e320957865ea8c40199082a5c67176350c4bc..9c4b0bedc6a950f40e4e6a77b305caa04b22950b 100644 (file)
@@ -3,7 +3,7 @@
 
 include linux-imx.inc
 
-PR = "${INC_PR}.7"
+PR = "${INC_PR}.8"
 
 COMPATIBLE_MACHINE = "(mx6)"
 
@@ -12,6 +12,7 @@ SRCREV = "059685632ebd37a89e60cbb1e6dd535b3b08c3be"
 LOCALVERSION = "-12.09.01+yocto"
 
 SRC_URI += "file://fix_getrusage_for_perf.patch \
+            file://egalax_ts-Add-support-for-single-touch-in-Kconfig.patch \
            "
 
 # iMX6Q SabreLITE changes done by Boundary Devices