Skip to contentSkip to conversation

input: Add support for Hanwang tablet

PATCH Superseded Xing Wei 2 participants 2 messages Aug 30, 2010

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Xing Wei

author
#0 lore raw

PATCH 1/1 input: Add support for Hanwang tablet

From: Xing Wei <[email protected]>

Add support for Art Master III tablet of BeiJing HanwangTechnology Co, Ltd.

---

This patch got several warnings(line over 80 characters).
This is our first time to submit the patch for linux and I really appreciate the comment and advice.

linux-2.6.35.3/drivers/hid/hid-core.c renamed from drivers/hid/hid-core.c +5 -0
diff -uprN -X linux-2.6.35.3-vanilla/Documentation/dontdiff linux-2.6.35.3-vanilla/drivers/hid/hid-core.c devel/linux-2.6.35.3/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.3/drivers/hid/hid-ids.h renamed from drivers/hid/hid-ids.h +3 -0
diff -uprN -X linux-2.6.35.3-vanilla/Documentation/dontdiff linux-2.6.35.3-vanilla/drivers/hid/hid-ids.h devel/linux-2.6.35.3/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_FIRST	0x5000
+#define USB_DEVICE_ID_HANWANG_TABLET_LAST	0x8fff
 
 #endif
linux-2.6.35.3/drivers/input/tablet/hanwang.c renamed from drivers/input/tablet/hanwang.c +351 -0

351 lines not on this page · raw message

linux-2.6.35.3/drivers/input/tablet/Kconfig renamed from drivers/input/tablet/Kconfig +13 -0
diff -uprN -X linux-2.6.35.3-vanilla/Documentation/dontdiff linux-2.6.35.3-vanilla/drivers/input/tablet/Kconfig devel/linux-2.6.35.3/drivers/input/tablet/Kconfig
@@ -75,4 +75,17 @@ config TABLET_USB_WACOM
 	  To compile this driver as a module, choose M here: the
 	  module will be called wacom.
 
+config TABLET_USB_HANWANG
+	tristate "Hanwang Art Master III tablet support (USB)"
+	depends on USB_ARCH_HAS_HCD
+	select USB
+	help
+	  Say Y here if you want to use the USB version of the Hanwang Art
+	  Master III tablet.  Make sure to say Y to "Mouse support"
+	  (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support"
+	  (CONFIG_INPUT_EVDEV) as well.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called hanwang.
+
 endif
linux-2.6.35.3/drivers/input/tablet/Makefile renamed from drivers/input/tablet/Makefile +1 -0
diff -uprN -X linux-2.6.35.3-vanilla/Documentation/dontdiff linux-2.6.35.3-vanilla/drivers/input/tablet/Makefile devel/linux-2.6.35.3/drivers/input/tablet/Makefile
@@ -10,3 +10,4 @@ obj-$(CONFIG_TABLET_USB_AIPTEK)	+= aipte
 obj-$(CONFIG_TABLET_USB_GTCO)	+= gtco.o
 obj-$(CONFIG_TABLET_USB_KBTAB)	+= kbtab.o
 obj-$(CONFIG_TABLET_USB_WACOM)	+= wacom.o
+obj-$(CONFIG_TABLET_USB_HANWANG) += hanwang.o
#1 lore raw
Quoted 30 lines · Xing Wei

From: Xing Wei <[email protected]>

Add support for Art Master III tablet of BeiJing HanwangTechnology Co, Ltd.

---

This patch got several warnings(line over 80 characters).
This is our first time to submit the patch for linux and I really appreciate the comment and advice.

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

linux-2.6.35.3/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.3-vanilla/Documentation/dontdiff linux-2.6.35.3-vanilla/drivers/hid/hid-ids.h devel/linux-2.6.35.3/drivers/hid/hid-ids.h

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

Quoted 6 lines
linux-2.6.35.3/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_FIRST	0x5000
+#define USB_DEVICE_ID_HANWANG_TABLET_LAST	0x8fff

Dmitry, once you are merging the driver, consider these hunks Acked by me. Thanks.

linux-2.6.35.3/drivers/input/tablet/hanwang.c line 6

Quoted 12 lines
linux-2.6.35.3/drivers/hid/hid-ids.h renamed from drivers/hid/hid-ids.h +0 -0
 #endif

diff -uprN -X linux-2.6.35.3-vanilla/Documentation/dontdiff linux-2.6.35.3-vanilla/drivers/input/tablet/hanwang.c devel/linux-2.6.35.3/drivers/input/tablet/hanwang.c

linux-2.6.35.3/drivers/input/tablet/hanwang.c renamed from drivers/input/tablet/hanwang.c +6 -0
@@ -0,0 +1,351 @@
+/*
+ *  USB Hanwang tablet support
+ *
+ *  Version Infomation & Changelog
+ *  v0.1 - Hanwang Art Master III support(0604,0906,1308)
+ *                      Xing Wei <[email protected]>

I think we don't need this 'v0.1' stuff. It usually gets obsoleted very quickly (everyone forgets to update the comments in a consistent way), and git is much better tracking revisions and changes.

Signature · 2 lines
Jiri Kosina
SUSE Labs, Novell Inc.