diff options
author | J. Aaron Gamble <john.gamble@windriver.com> | 2010-10-27 11:03:17 -0400 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-11-10 21:22:26 +0800 |
commit | a8b11645e48f7a86be96322bda249574ae100f1f (patch) | |
tree | 9348a21e7bed5c2e954325024238b597e7df4539 /meta/recipes-graphics/tslib/tslib | |
parent | 93eae97ca290063bea13467e4af59af23c67dbe2 (diff) | |
download | poky-a8b11645e48f7a86be96322bda249574ae100f1f.tar.gz |
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/tslib')
-rw-r--r-- | meta/recipes-graphics/tslib/tslib/32bitBE-support.patch | 52 |
1 files changed, 52 insertions, 0 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 0000000000..3262f16c6d --- /dev/null +++ b/meta/recipes-graphics/tslib/tslib/32bitBE-support.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | #! /bin/sh /usr/share/dpatch/dpatch-run | ||
2 | ## 030-32bitBE-support.dpatch by Neil Williams <codehelp@debian.org> | ||
3 | ## | ||
4 | ## All lines beginning with `## DP:' are a description of the patch. | ||
5 | ## DP: See bug #496759 - being tested upstream for 32bit BE devices | ||
6 | |||
7 | @DPATCH@ | ||
8 | diff -urNad tslib-1.0~/plugins/input-raw.c tslib-1.0/plugins/input-raw.c | ||
9 | --- tslib-1.0~/plugins/input-raw.c 2008-12-09 10:56:47.000000000 +0000 | ||
10 | +++ tslib-1.0/plugins/input-raw.c 2008-12-09 11:05:41.000000000 +0000 | ||
11 | @@ -44,25 +44,33 @@ | ||
12 | int using_syn; | ||
13 | }; | ||
14 | |||
15 | +#define BITS_PER_LONG (sizeof(long) * 8) | ||
16 | +#ifndef EV_CNT | ||
17 | +#define EV_CNT (EV_MAX+1) | ||
18 | +#endif | ||
19 | +#ifndef ABS_CNT | ||
20 | +#define ABS_CNT (ABS_MAX+1) | ||
21 | +#endif | ||
22 | + | ||
23 | static int check_fd(struct tslib_input *i) | ||
24 | { | ||
25 | struct tsdev *ts = i->module.dev; | ||
26 | int version; | ||
27 | - u_int32_t bit; | ||
28 | - u_int64_t absbit; | ||
29 | + unsigned long bit[EV_CNT / BITS_PER_LONG + 1]; | ||
30 | + unsigned long absbit[ABS_MAX / BITS_PER_LONG + 1]; | ||
31 | |||
32 | if (! ((ioctl(ts->fd, EVIOCGVERSION, &version) >= 0) && | ||
33 | (version == EV_VERSION) && | ||
34 | - (ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit) * 8), &bit) >= 0) && | ||
35 | - (bit & (1 << EV_ABS)) && | ||
36 | - (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit) * 8), &absbit) >= 0) && | ||
37 | - (absbit & (1 << ABS_X)) && | ||
38 | - (absbit & (1 << ABS_Y)) && (absbit & (1 << ABS_PRESSURE)))) { | ||
39 | + (ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit)), bit) >= 0) && | ||
40 | + (bit[0] & (1 << EV_ABS)) && | ||
41 | + (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) >= 0) && | ||
42 | + (absbit[0] & (1 << ABS_X)) && | ||
43 | + (absbit[0] & (1 << ABS_Y)) && (absbit[0] & (1 << ABS_PRESSURE)))) { | ||
44 | fprintf(stderr, "selected device is not a touchscreen I understand\n"); | ||
45 | return -1; | ||
46 | } | ||
47 | |||
48 | - if (bit & (1 << EV_SYN)) | ||
49 | + if (bit[0] & (1 << EV_SYN)) | ||
50 | i->using_syn = 1; | ||
51 | |||
52 | return 0; | ||