linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rafi Rubin <rafi@seas.upenn.edu>
To: linux-input@vger.kernel.org
Cc: "Stéphane Chatty" <chatty@enac.fr>
Subject: [PATCH] Restoring usages used by the pen.
Date: Tue, 16 Jun 2009 22:39:13 -0400	[thread overview]
Message-ID: <4A385751.8000904@seas.upenn.edu> (raw)

Restoring usages used by the pen.

Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu>
---
 drivers/hid/hid-ntrig.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
index 75ed9d2..aeab973 100644
--- a/drivers/hid/hid-ntrig.c
+++ b/drivers/hid/hid-ntrig.c
@@ -62,11 +62,15 @@ static int ntrig_input_mapping(struct hid_device *hdev, struct hid_input *hi,

 	case HID_UP_DIGITIZER:
 		switch (usage->hid) {
+
+		/* these are actually used by the pen */
+		case HID_DG_INVERT: /* high when the eraser button is pressed */
+		case HID_DG_ERASER: /* high when the tip and eraser are both pressed */
+		case HID_DG_BARRELSWITCH:  /* doubtful */
+			return 0;
+
 		/* we do not want to map these for now */
-		case HID_DG_INVERT: /* value is always 0 */
-		case HID_DG_ERASER: /* value is always 0 */
 		case HID_DG_CONTACTID: /* value is useless */
-		case HID_DG_BARRELSWITCH:  /* doubtful */
 		case HID_DG_INPUTMODE:
 		case HID_DG_DEVICEINDEX:
 		case HID_DG_CONTACTCOUNT:
@@ -233,6 +237,7 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)

 	if (ret)
 		kfree (nd);
+
 	return ret;
 }

-- 
1.6.3.1



             reply	other threads:[~2009-06-17  2:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-17  2:39 Rafi Rubin [this message]
2009-06-17  9:23 ` [PATCH] Restoring usages used by the pen Stéphane Chatty
2009-06-17 12:01   ` Mohamed Ikbel Boulabiar
2009-06-17 18:34   ` Rafi Rubin
2009-06-17 19:29     ` Stéphane Chatty
2009-06-17 20:35       ` Rafi Rubin
2009-06-17 20:47   ` Rafi Rubin

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=4A385751.8000904@seas.upenn.edu \
    --to=rafi@seas.upenn.edu \
    --cc=chatty@enac.fr \
    --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).