summaryrefslogtreecommitdiff
path: root/meta/recipes-graphics/tslib
diff options
context:
space:
mode:
authorJ. Aaron Gamble <john.gamble@windriver.com>2010-10-27 11:03:17 -0400
committerRichard Purdie <rpurdie@linux.intel.com>2010-11-10 21:22:26 +0800
commita8b11645e48f7a86be96322bda249574ae100f1f (patch)
tree9348a21e7bed5c2e954325024238b597e7df4539 /meta/recipes-graphics/tslib
parent93eae97ca290063bea13467e4af59af23c67dbe2 (diff)
downloadopenembedded-core-a8b11645e48f7a86be96322bda249574ae100f1f.tar.gz
openembedded-core-a8b11645e48f7a86be96322bda249574ae100f1f.tar.bz2
openembedded-core-a8b11645e48f7a86be96322bda249574ae100f1f.tar.xz
openembedded-core-a8b11645e48f7a86be96322bda249574ae100f1f.zip
tslib: 32bit big endian support
Fixes [BUGID #394] patch added from: https://launchpad.net/ubuntu/+source/tslib/1.0-7 Enables wacom tablet/touchscreen support on qemumips Signed-off-by: J. Aaron Gamble <john.gamble@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta/recipes-graphics/tslib')
-rw-r--r--meta/recipes-graphics/tslib/tslib/32bitBE-support.patch52
-rw-r--r--meta/recipes-graphics/tslib/tslib_1.0.bb4
2 files changed, 55 insertions, 1 deletions
diff --git a/meta/recipes-graphics/tslib/tslib/32bitBE-support.patch b/meta/recipes-graphics/tslib/tslib/32bitBE-support.patch
new file mode 100644
index 000000000..3262f16c6
--- /dev/null
+++ b/meta/recipes-graphics/tslib/tslib/32bitBE-support.patch
@@ -0,0 +1,52 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 030-32bitBE-support.dpatch by Neil Williams <codehelp@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: See bug #496759 - being tested upstream for 32bit BE devices
+
+@DPATCH@
+diff -urNad tslib-1.0~/plugins/input-raw.c tslib-1.0/plugins/input-raw.c
+--- tslib-1.0~/plugins/input-raw.c 2008-12-09 10:56:47.000000000 +0000
++++ tslib-1.0/plugins/input-raw.c 2008-12-09 11:05:41.000000000 +0000
+@@ -44,25 +44,33 @@
+ int using_syn;
+ };
+
++#define BITS_PER_LONG (sizeof(long) * 8)
++#ifndef EV_CNT
++#define EV_CNT (EV_MAX+1)
++#endif
++#ifndef ABS_CNT
++#define ABS_CNT (ABS_MAX+1)
++#endif
++
+ static int check_fd(struct tslib_input *i)
+ {
+ struct tsdev *ts = i->module.dev;
+ int version;
+- u_int32_t bit;
+- u_int64_t absbit;
++ unsigned long bit[EV_CNT / BITS_PER_LONG + 1];
++ unsigned long absbit[ABS_MAX / BITS_PER_LONG + 1];
+
+ if (! ((ioctl(ts->fd, EVIOCGVERSION, &version) >= 0) &&
+ (version == EV_VERSION) &&
+- (ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit) * 8), &bit) >= 0) &&
+- (bit & (1 << EV_ABS)) &&
+- (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit) * 8), &absbit) >= 0) &&
+- (absbit & (1 << ABS_X)) &&
+- (absbit & (1 << ABS_Y)) && (absbit & (1 << ABS_PRESSURE)))) {
++ (ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit)), bit) >= 0) &&
++ (bit[0] & (1 << EV_ABS)) &&
++ (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) >= 0) &&
++ (absbit[0] & (1 << ABS_X)) &&
++ (absbit[0] & (1 << ABS_Y)) && (absbit[0] & (1 << ABS_PRESSURE)))) {
+ fprintf(stderr, "selected device is not a touchscreen I understand\n");
+ return -1;
+ }
+
+- if (bit & (1 << EV_SYN))
++ if (bit[0] & (1 << EV_SYN))
+ i->using_syn = 1;
+
+ return 0;
diff --git a/meta/recipes-graphics/tslib/tslib_1.0.bb b/meta/recipes-graphics/tslib/tslib_1.0.bb
index 12c0ace8f..8db90d944 100644
--- a/meta/recipes-graphics/tslib/tslib_1.0.bb
+++ b/meta/recipes-graphics/tslib/tslib_1.0.bb
@@ -6,7 +6,7 @@ SECTION = "base"
LICENSE = "LGPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=f30a9716ef3762e3467a2f62bf790f0a"
-PR = "r15"
+PR = "r16"
SRC_URI = "http://download.berlios.de/tslib/tslib-${PV}.tar.bz2 \
file://fix_version.patch;patch=1 \
@@ -16,6 +16,8 @@ SRC_URI = "http://download.berlios.de/tslib/tslib-${PV}.tar.bz2 \
file://tslib.sh"
SRC_URI_append_mnci += " file://devfs.patch;patch=1"
SRC_URI_append_mnci += " file://event1.patch;patch=1"
+SRC_URI_append_qemumips += " file://32bitBE-support.patch;patch=1"
+
inherit autotools pkgconfig