Skip to contentSkip to conversation

HID: add support for Huion 580 tablet

PATCH Superseded Martin Rusko 2 participants 4 messages May 28, 2013 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: add support for Huion 580 tablet

---
 drivers/hid/Kconfig     |    6 ++
 drivers/hid/Makefile    |    1 +
 drivers/hid/hid-core.c  |    1 +
 drivers/hid/hid-huion.c |  177 +++++++++++++++++++++++++++++++++++++++++++++++
 drivers/hid/hid-ids.h   |    3 +
 5 files changed, 188 insertions(+), 0 deletions(-)
 create mode 100644 drivers/hid/hid-huion.c
drivers/hid/Kconfig +6 -0
index fb52f3f..015e615 100644
@@ -240,6 +240,12 @@ config HOLTEK_FF
 	  Say Y here if you have a Holtek On Line Grip based game controller
 	  and want to have force feedback support for it.
 
+config HID_HUION
+	tristate "Huion tablets"
+	depends on USB_HID
+	---help---
+	Support for Huion 580 tablet.
+
 config HID_KEYTOUCH
 	tristate "Keytouch HID devices"
 	depends on HID
drivers/hid/Makefile +1 -0
index 2065694..b15602b 100644
@@ -52,6 +52,7 @@ obj-$(CONFIG_HID_EZKEY)		+= hid-ezkey.o
 obj-$(CONFIG_HID_GYRATION)	+= hid-gyration.o
 obj-$(CONFIG_HID_HOLTEK)	+= hid-holtek-kbd.o
 obj-$(CONFIG_HID_HOLTEK)	+= hid-holtekff.o
+obj-$(CONFIG_HID_HUION)		+= hid-huion.o
 obj-$(CONFIG_HID_HYPERV_MOUSE)	+= hid-hyperv.o
 obj-$(CONFIG_HID_ICADE)		+= hid-icade.o
 obj-$(CONFIG_HID_KENSINGTON)	+= hid-kensington.o
drivers/hid/hid-core.c +1 -0
index 264f550..96a8348 100644
@@ -1584,6 +1584,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK, USB_DEVICE_ID_HOLTEK_ON_LINE_GRIP) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_580) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) },
drivers/hid/hid-huion.c new file +177 -0

177 lines not on this page · raw message

drivers/hid/hid-ids.h +3 -0
index 38535c9..983fd22 100644
@@ -425,6 +425,9 @@
 #define USB_DEVICE_ID_UGCI_FLYING	0x0020
 #define USB_DEVICE_ID_UGCI_FIGHTING	0x0030
 
+#define USB_VENDOR_ID_HUION		0x256c
+#define USB_DEVICE_ID_HUION_580		0x006e
+
 #define USB_VENDOR_ID_IDEACOM		0x1cb6
 #define USB_DEVICE_ID_IDEACOM_IDC6650	0x6650
 #define USB_DEVICE_ID_IDEACOM_IDC6651	0x6651
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 10 lines · Martin Rusko
---
 drivers/hid/Kconfig     |    6 ++
 drivers/hid/Makefile    |    1 +
 drivers/hid/hid-core.c  |    1 +
 drivers/hid/hid-huion.c |  177 +++++++++++++++++++++++++++++++++++++++++++++++
 drivers/hid/hid-ids.h   |    3 +
 5 files changed, 188 insertions(+), 0 deletions(-)
 create mode 100644 drivers/hid/hid-huion.c

Martin,

could you please provide changelog for this patch as well? What's mostly interesting is:

- a brief description of the device
- a brief description of the changes necessary to make it work (the deviations from the HID standard)

Thanks.

Signature · 2 lines
Jiri Kosina
SUSE Labs
#2 lore raw

PATCH v2 1/1 HID: add support for Huion 580 tablet

Add hid-huion.c with support for Huion 580 tablet, which is simple 8x5" tablet with 4000LPI resolution and 2048 levels pressure-sensitive pen manufactured by the Chinese company Huion.

The driver fixes incorrect report descriptor sent by the device, performs custom initialization required to switch the tablet into its native resolution mode and inverts the in-range bit.

---
 drivers/hid/Kconfig     |    6 ++
 drivers/hid/Makefile    |    1 +
 drivers/hid/hid-core.c  |    1 +
 drivers/hid/hid-huion.c |  177 +++++++++++++++++++++++++++++++++++++++++++++++
 drivers/hid/hid-ids.h   |    3 +
 5 files changed, 188 insertions(+), 0 deletions(-)
 create mode 100644 drivers/hid/hid-huion.c
drivers/hid/Kconfig +6 -0
index fb52f3f..015e615 100644
@@ -240,6 +240,12 @@ config HOLTEK_FF
 	  Say Y here if you have a Holtek On Line Grip based game controller
 	  and want to have force feedback support for it.
 
+config HID_HUION
+	tristate "Huion tablets"
+	depends on USB_HID
+	---help---
+	Support for Huion 580 tablet.
+
 config HID_KEYTOUCH
 	tristate "Keytouch HID devices"
 	depends on HID
drivers/hid/Makefile +1 -0
index 2065694..b15602b 100644
@@ -52,6 +52,7 @@ obj-$(CONFIG_HID_EZKEY)		+= hid-ezkey.o
 obj-$(CONFIG_HID_GYRATION)	+= hid-gyration.o
 obj-$(CONFIG_HID_HOLTEK)	+= hid-holtek-kbd.o
 obj-$(CONFIG_HID_HOLTEK)	+= hid-holtekff.o
+obj-$(CONFIG_HID_HUION)		+= hid-huion.o
 obj-$(CONFIG_HID_HYPERV_MOUSE)	+= hid-hyperv.o
 obj-$(CONFIG_HID_ICADE)		+= hid-icade.o
 obj-$(CONFIG_HID_KENSINGTON)	+= hid-kensington.o
drivers/hid/hid-core.c +1 -0
index 264f550..96a8348 100644
@@ -1584,6 +1584,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK, USB_DEVICE_ID_HOLTEK_ON_LINE_GRIP) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_580) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) },
drivers/hid/hid-huion.c new file +177 -0

177 lines not on this page · raw message

drivers/hid/hid-ids.h +3 -0
index 38535c9..983fd22 100644
@@ -425,6 +425,9 @@
 #define USB_DEVICE_ID_UGCI_FLYING	0x0020
 #define USB_DEVICE_ID_UGCI_FIGHTING	0x0030
 
+#define USB_VENDOR_ID_HUION		0x256c
+#define USB_DEVICE_ID_HUION_580		0x006e
+
 #define USB_VENDOR_ID_IDEACOM		0x1cb6
 #define USB_DEVICE_ID_IDEACOM_IDC6650	0x6650
 #define USB_DEVICE_ID_IDEACOM_IDC6651	0x6651
Signature · 1 line
1.7.5.4
Applied
#3 lore raw
Quoted 9 lines · Martin Rusko

Add hid-huion.c with support for Huion 580 tablet, which is simple 8x5" tablet with 4000LPI resolution and 2048 levels pressure-sensitive pen manufactured by the Chinese company Huion.

The driver fixes incorrect report descriptor sent by the device, performs custom initialization required to switch the tablet into its native resolution mode and inverts the in-range bit.

Applied, thanks.

Signature · 2 lines
Jiri Kosina
SUSE Labs