linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: chatty@lii-enac.fr (Stephane Chatty)
To: dmitry.torokhov@gmail.com, jkosina@suse.cz, linux-input@vger.kernel.org
Cc: chatty@enac.fr
Subject: [PATCH] Added support for pressure on the Stantum multitouch panel
Date: Sat, 06 Feb 2010 15:20:03 +0100	[thread overview]
Message-ID: <20100206142003.9B86A9520A@smtp.lii-enac.fr> (raw)

Added pressure handling for Stantum multitouch panels

Signed-off-by: Stephane Chatty <chatty@enac.fr>

diff -rupN a/drivers/hid/hid-stantum.c b/drivers/hid/hid-stantum.c
--- a/drivers/hid/hid-stantum.c	2010-02-06 15:01:17.000000000 +0100
+++ b/drivers/hid/hid-stantum.c	2010-02-06 15:03:45.000000000 +0100
@@ -16,7 +16,7 @@
 #include <linux/hid.h>
 #include <linux/module.h>
 
-MODULE_VERSION("1.01");
+MODULE_VERSION("1.02");
 MODULE_AUTHOR("Stephane Chatty <chatty@enac.fr>");
 MODULE_DESCRIPTION("Stantum HID multitouch panels");
 MODULE_LICENSE("GPL");
@@ -66,7 +66,6 @@ static int stantum_input_mapping(struct 
 		case HID_DG_DEVICEINDEX:
 		case HID_DG_CONTACTCOUNT:
 		case HID_DG_CONTACTMAX:
-		case HID_DG_TIPPRESSURE:
 			return -1;
 
 		case HID_DG_TIPSWITCH:
@@ -84,6 +83,11 @@ static int stantum_input_mapping(struct 
 			input_set_abs_params(hi->input, ABS_MT_ORIENTATION,
 					1, 1, 0, 0);
 			return 1;
+		case HID_DG_TIPPRESSURE:
+			hid_map_usage(hi, usage, bit, max,
+					EV_ABS, ABS_MT_PRESSURE);
+			return 1;
+
 		case HID_DG_CONTACTID:
 			hid_map_usage(hi, usage, bit, max,
 					EV_ABS, ABS_MT_TRACKING_ID);
@@ -140,10 +144,7 @@ static void stantum_filter_event(struct 
 	input_event(input, EV_ABS, ABS_MT_TOUCH_MAJOR, wide ? sd->w : sd->h);
 	input_event(input, EV_ABS, ABS_MT_TOUCH_MINOR, wide ? sd->h : sd->w);
 
-#if 0
-	/* MT_PRESSURE does not exist yet */
 	input_event(input, EV_ABS, ABS_MT_PRESSURE, sd->z);
-#endif
 
 	input_mt_sync(input);
 	sd->valid = false;

             reply	other threads:[~2010-02-06 14:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-06 14:20 Stephane Chatty [this message]
2010-02-10 11:07 ` [PATCH] Added support for pressure on the Stantum multitouch panel Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100206142003.9B86A9520A@smtp.lii-enac.fr \
    --to=chatty@lii-enac.fr \
    --cc=chatty@enac.fr \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).