/[linux-patches]/genpatches-2.6/tags/3.0-30/2635_Input-ALPS-dump-raw-packet-data.patch
Gentoo

Contents of /genpatches-2.6/tags/3.0-30/2635_Input-ALPS-dump-raw-packet-data.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2206 - (show annotations) (download)
Mon Sep 17 18:58:14 2012 UTC (21 months, 3 weeks ago) by mpagano
File size: 1712 byte(s)
3.0-30 release
1 From e7ac8e59a83861434002be34c64bf2614825645e Mon Sep 17 00:00:00 2001
2 From: Seth Forshee <seth.forshee@canonical.com>
3 Date: Wed, 14 Sep 2011 11:40:39 -0500
4 Subject: [PATCH 8/8] Input: ALPS - dump raw packet data
5
6 ---
7 drivers/input/mouse/alps.c | 20 +++++++++++++++++++-
8 1 files changed, 19 insertions(+), 1 deletions(-)
9
10 diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
11 index 8902a11..378e6fa 100644
12 --- a/drivers/input/mouse/alps.c
13 +++ b/drivers/input/mouse/alps.c
14 @@ -15,6 +15,8 @@
15 * the Free Software Foundation.
16 */
17
18 +#define DEBUG
19 +
20 #include <linux/slab.h>
21 #include <linux/input.h>
22 #include <linux/input/mt.h>
23 @@ -24,7 +26,7 @@
24 #include "psmouse.h"
25 #include "alps.h"
26
27 -#undef DEBUG
28 +/* #undef DEBUG */
29 #ifdef DEBUG
30 #define dbg(format, arg...) printk(KERN_INFO "alps.c: " format "\n", ## arg)
31 #else
32 @@ -129,6 +131,19 @@ static const struct alps_model_info alps_model_data[] = {
33
34 /* Packet formats are described in Documentation/input/alps.txt */
35
36 +static int alps_dump_packets = 0;
37 +module_param(alps_dump_packets, int, 0644);
38 +
39 +static void alps_packet_dump(unsigned char *packet, int size)
40 +{
41 + int i;
42 +
43 + printk("ALPS data ");
44 + for (i = 0; i < size; i++)
45 + printk("%02hhx ", packet[i]);
46 + printk("\n");
47 +}
48 +
49 static bool alps_is_valid_first_byte(const struct alps_model_info *model,
50 unsigned char data)
51 {
52 @@ -649,6 +664,9 @@ static void alps_process_packet(struct psmouse *psmouse)
53 struct alps_data *priv = psmouse->private;
54 const struct alps_model_info *model = priv->i;
55
56 + if (alps_dump_packets)
57 + alps_packet_dump(psmouse->packet, psmouse->pktcnt);
58 +
59 switch (model->proto_version) {
60 case ALPS_PROTO_V1:
61 case ALPS_PROTO_V2:
62 --
63 1.7.4.1

  ViewVC Help
Powered by ViewVC 1.1.20