linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Restoring usages used by the pen.
@ 2009-06-17  2:39 Rafi Rubin
  2009-06-17  9:23 ` Stéphane Chatty
  0 siblings, 1 reply; 7+ messages in thread
From: Rafi Rubin @ 2009-06-17  2:39 UTC (permalink / raw)
  To: linux-input; +Cc: Stéphane Chatty

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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-06-17 20:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-17  2:39 [PATCH] Restoring usages used by the pen Rafi Rubin
2009-06-17  9:23 ` 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

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).