[PATCH] n-trig digitizer quirks

From: Raphael Yoram Rubin
Date: Fri Nov 14 2008 - 12:18:18 EST


Added quirks for the N-Trig digitizer.
Signed-off-by: Rafi Rubin <rafi@xxxxxxxxxxxxxx>

---
diff -uprN linux-2.6.27.6-vanilla/drivers/hid/hid-input-quirks.c linux-2.6.27.6/drivers/hid/hid-input-quirks.c
--- linux-2.6.27.6-vanilla/drivers/hid/hid-input-quirks.c 2008-11-13 12:56:21.000000000 -0500
+++ linux-2.6.27.6/drivers/hid/hid-input-quirks.c 2008-11-14 07:17:54.721758855 -0500
@@ -314,6 +314,17 @@ static int quirk_sunplus_wdesktop(struct
return 1;
}

+static int quirk_ntrig_touch_screen(struct hid_usage *usage, struct input_dev *input,
+ unsigned long **bit, int *max)
+{
+ if ( (usage->hid & HID_USAGE_PAGE) == HID_UP_DIGITIZER &&
+ (usage->hid & 0xff) == 0x47) {
+ map_key_clear(BTN_TOOL_DOUBLETAP);
+ return 1;
+ }
+ return 0;
+}
+
#define VENDOR_ID_BELKIN 0x1020
#define DEVICE_ID_BELKIN_WIRELESS_KEYBOARD 0x0006

@@ -335,6 +346,9 @@ static int quirk_sunplus_wdesktop(struct
#define DEVICE_ID_S510_RECEIVER_2 0xc517
#define DEVICE_ID_MX3000_RECEIVER 0xc513

+#define VENDOR_ID_NTRIG 0x1b96
+#define DEVICE_ID_NTRIG_TOUCH_SCREEN 0x0001
+
#define VENDOR_ID_MICROSOFT 0x045e
#define DEVICE_ID_MS4K 0x00db
#define DEVICE_ID_MS6K 0x00f9
@@ -380,6 +394,7 @@ static const struct hid_input_blacklist
{ VENDOR_ID_PETALYNX, DEVICE_ID_PETALYNX_MAXTER_REMOTE, quirk_petalynx_remote },

{ VENDOR_ID_SUNPLUS, DEVICE_ID_SUNPLUS_WDESKTOP, quirk_sunplus_wdesktop },
+ { VENDOR_ID_NTRIG, DEVICE_ID_NTRIG_TOUCH_SCREEN, quirk_ntrig_touch_screen },

{ 0, 0, NULL }
};
diff -uprN linux-2.6.27.6-vanilla/drivers/hid/usbhid/hid-quirks.c linux-2.6.27.6/drivers/hid/usbhid/hid-quirks.c
--- linux-2.6.27.6-vanilla/drivers/hid/usbhid/hid-quirks.c 2008-11-13 12:56:21.000000000 -0500
+++ linux-2.6.27.6/drivers/hid/usbhid/hid-quirks.c 2008-11-14 07:17:54.722758633 -0500
@@ -359,6 +359,9 @@
#define USB_VENDOR_ID_NEC 0x073e
#define USB_DEVICE_ID_NEC_USB_GAME_PAD 0x0301

+#define USB_VENDOR_ID_NTRIG 0x1b96
+#define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN 0x0001
+
#define USB_VENDOR_ID_ONTRAK 0x0a07
#define USB_DEVICE_ID_ONTRAK_ADU100 0x0064

@@ -448,6 +451,7 @@ static const struct hid_blacklist {
{ USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT },
{ USB_VENDOR_ID_NATSU, USB_DEVICE_ID_NATSU_GAMEPAD, HID_QUIRK_BADPAD },
{ USB_VENDOR_ID_NEC, USB_DEVICE_ID_NEC_USB_GAME_PAD, HID_QUIRK_BADPAD },
+ { USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN, HID_QUIRK_DUPLICATE_USAGES },
{ USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RUMBLEPAD, HID_QUIRK_BADPAD },
{ USB_VENDOR_ID_TOPMAX, USB_DEVICE_ID_TOPMAX_COBRAPAD, HID_QUIRK_BADPAD },

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