[PATCH] Restoring usages used by the pen.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Restoring usages used by the pen.

Signed-off-by: Rafi Rubin <rafi@xxxxxxxxxxxxxx>
---
 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


--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux