Skip to contentSkip to conversation

drivers/hid: the support for Hanwang tablet

PATCH In review Xing Wei 2 participants 3 messages Aug 11, 2010 HID

lore
Share & tools
lore

Xing Wei

author
#0 lore raw

PATCH 1/1 drivers/hid: the support for Hanwang tablet

From: Xing Wei <[email protected]>

This patch is the support for tablet of BeiJing HanwangTechnology Co, Ltd. The main purpose is to make the device taken over by our driver. The driver code will be submitted later.

---
This is our first time to submit the patch for linux.We'll really appreciate the comment and advice.

linux-2.6.35/drivers/hid/hid-core.c renamed from drivers/hid/hid-core.c +5 -0
diff -uprN -X linux-2.6.35-vanilla/Documentation/dontdiff linux-2.6.35-vanilla/drivers/hid/hid-core.c devel/linux-2.6.35/drivers/hid/hid-core.c
@@ -1759,6 +1759,11 @@ static bool hid_ignore(struct hid_device
 		    hdev->product <= USB_DEVICE_ID_SOUNDGRAPH_IMON_LAST)
 			return true;
 		break;
+	case USB_VENDOR_ID_HANWANG:
+		if (hdev->product >= USB_DEVICE_ID_HANWANG_TABLET_FIRST &&
+		    hdev->product <= USB_DEVICE_ID_HANWANG_TABLET_LAST)
+			return true;
+		break;
 	}
 
 	if (hdev->type == HID_TYPE_USBMOUSE &&
linux-2.6.35/drivers/hid/hid-ids.h renamed from drivers/hid/hid-ids.h +3 -0
diff -uprN -X linux-2.6.35-vanilla/Documentation/dontdiff linux-2.6.35-vanilla/drivers/hid/hid-ids.h devel/linux-2.6.35/drivers/hid/hid-ids.h
@@ -526,5 +526,8 @@
 #define USB_DEVICE_ID_KYE_ERGO_525V	0x0087
 #define USB_DEVICE_ID_KYE_GPEN_560	0x5003
 
+#define USB_VENDOR_ID_HANWANG		0x0b57
+#define USB_DEVICE_ID_HANWANG_TABLET_LAST	0x8fff
+#define USB_DEVICE_ID_HANWANG_TABLET_FIRST	0x5000
 
 #endif
#1 lore raw
Quoted 30 lines · Xing Wei

From: Xing Wei <[email protected]>

This patch is the support for tablet of BeiJing HanwangTechnology Co, Ltd. The main purpose is to make the device taken over by our driver. The driver code will be submitted later.

---
This is our first time to submit the patch for linux.We'll really appreciate the comment and advice.

diff -uprN -X linux-2.6.35-vanilla/Documentation/dontdiff linux-2.6.35-vanilla/drivers/hid/hid-core.c devel/linux-2.6.35/drivers/hid/hid-core.c

linux-2.6.35/drivers/hid/hid-core.c renamed from drivers/hid/hid-core.c +5 -0
@@ -1759,6 +1759,11 @@ static bool hid_ignore(struct hid_device
 		    hdev->product <= USB_DEVICE_ID_SOUNDGRAPH_IMON_LAST)
 			return true;
 		break;
+	case USB_VENDOR_ID_HANWANG:
+		if (hdev->product >= USB_DEVICE_ID_HANWANG_TABLET_FIRST &&
+		    hdev->product <= USB_DEVICE_ID_HANWANG_TABLET_LAST)
+			return true;
+		break;
 	}
 
 	if (hdev->type == HID_TYPE_USBMOUSE &&

diff -uprN -X linux-2.6.35-vanilla/Documentation/dontdiff linux-2.6.35-vanilla/drivers/hid/hid-ids.h devel/linux-2.6.35/drivers/hid/hid-ids.h

linux-2.6.35/drivers/hid/hid-ids.h line 531

Quoted 6 lines
linux-2.6.35/drivers/hid/hid-ids.h renamed from drivers/hid/hid-ids.h +3 -0
@@ -526,5 +526,8 @@
 #define USB_DEVICE_ID_KYE_ERGO_525V	0x0087
 #define USB_DEVICE_ID_KYE_GPEN_560	0x5003
 
+#define USB_VENDOR_ID_HANWANG		0x0b57
+#define USB_DEVICE_ID_HANWANG_TABLET_LAST	0x8fff
+#define USB_DEVICE_ID_HANWANG_TABLET_FIRST	0x5000

The patch is fine (I'd only suggest swapping 'LAST' and 'FIRST' lines here to keep proper ordering), but I will be applying it only together with the driver once you submit it, as it doesn't make sense stand-alone.

The driver is not HID-based (i.e. not using hid bus), but completely standalone, right?

Signature · 2 lines
Jiri Kosina
SUSE Labs, Novell Inc.
author
#2 lore raw

ok,i'll fix it and submit it with driver later.
The driver is just using usb bus.

-------------------------------------------------------------
发件人:Jiri Kosina
发送日期:2010-08-11 15:34:49
收件人:Xing Wei
抄送:linux-input; linux-kernel
主题:Re: [PATCH] drivers/hid: the support for Hanwang tablet

Quoted 30 lines · Xing Wei

From: Xing Wei <[email protected]>

This patch is the support for tablet of BeiJing HanwangTechnology Co, Ltd. The main purpose is to make the device taken over by our driver. The driver code will be submitted later.

---
This is our first time to submit the patch for linux.We'll really appreciate the comment and advice.

diff -uprN -X linux-2.6.35-vanilla/Documentation/dontdiff linux-2.6.35-vanilla/drivers/hid/hid-core.c devel/linux-2.6.35/drivers/hid/hid-core.c

linux-2.6.35/drivers/hid/hid-core.c renamed from drivers/hid/hid-core.c +5 -0
@@ -1759,6 +1759,11 @@ static bool hid_ignore(struct hid_device
 		    hdev->product <= USB_DEVICE_ID_SOUNDGRAPH_IMON_LAST)
 			return true;
 		break;
+	case USB_VENDOR_ID_HANWANG:
+		if (hdev->product >= USB_DEVICE_ID_HANWANG_TABLET_FIRST &&
+		    hdev->product <= USB_DEVICE_ID_HANWANG_TABLET_LAST)
+			return true;
+		break;
 	}
 
 	if (hdev->type == HID_TYPE_USBMOUSE &&

diff -uprN -X linux-2.6.35-vanilla/Documentation/dontdiff linux-2.6.35-vanilla/drivers/hid/hid-ids.h devel/linux-2.6.35/drivers/hid/hid-ids.h

linux-2.6.35/drivers/hid/hid-ids.h line 531

Quoted 6 lines
linux-2.6.35/drivers/hid/hid-ids.h renamed from drivers/hid/hid-ids.h +3 -0
@@ -526,5 +526,8 @@
 #define USB_DEVICE_ID_KYE_ERGO_525V	0x0087
 #define USB_DEVICE_ID_KYE_GPEN_560	0x5003
 
+#define USB_VENDOR_ID_HANWANG		0x0b57
+#define USB_DEVICE_ID_HANWANG_TABLET_LAST	0x8fff
+#define USB_DEVICE_ID_HANWANG_TABLET_FIRST	0x5000

The patch is fine (I'd only suggest swapping 'LAST' and 'FIRST' lines here to keep proper ordering), but I will be applying it only together with the driver once you submit it, as it doesn't make sense stand-alone.

The driver is not HID-based (i.e. not using hid bus), but completely standalone, right?

Signature · 6 lines
Jiri Kosina
SUSE Labs, Novell Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html