aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolai Kondrashov <spbnick@gmail.com>2014-07-23 12:31:54 -0400
committerJiri Kosina <jkosina@suse.cz>2014-07-29 05:21:24 -0400
commite917e98f4829a5842ea8283548bf5dedfd88b2d0 (patch)
tree7e02c173ff340d5ed085642ceacf8fd2d89ff1e8
parent4c2f503aade27ebf12f5733a583d711f99dc5ec1 (diff)
HID: huion: Use "tablet" instead of specific model
Use word "tablet" in identifiers and comments instead of referring to specific Huion tablet model name, as the product ID is used by at least several tablet models. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--drivers/hid/hid-core.c2
-rw-r--r--drivers/hid/hid-huion.c25
-rw-r--r--drivers/hid/hid-ids.h2
3 files changed, 15 insertions, 14 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 8ed66fd1ea87..84ed7d4ba03d 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1782,7 +1782,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
1782 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A070) }, 1782 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A070) },
1783 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A072) }, 1783 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A072) },
1784 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081) }, 1784 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081) },
1785 { HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_580) }, 1785 { HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_TABLET) },
1786 { HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) }, 1786 { HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) },
1787 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) }, 1787 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) },
1788 { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) }, 1788 { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) },
diff --git a/drivers/hid/hid-huion.c b/drivers/hid/hid-huion.c
index cbf4da4689ba..25d01cdd3bbc 100644
--- a/drivers/hid/hid-huion.c
+++ b/drivers/hid/hid-huion.c
@@ -2,6 +2,7 @@
2 * HID driver for Huion devices not fully compliant with HID standard 2 * HID driver for Huion devices not fully compliant with HID standard
3 * 3 *
4 * Copyright (c) 2013 Martin Rusko 4 * Copyright (c) 2013 Martin Rusko
5 * Copyright (c) 2014 Nikolai Kondrashov
5 */ 6 */
6 7
7/* 8/*
@@ -19,11 +20,11 @@
19 20
20#include "hid-ids.h" 21#include "hid-ids.h"
21 22
22/* Original Huion 580 report descriptor size */ 23/* Original tablet report descriptor size */
23#define HUION_580_RDESC_ORIG_SIZE 177 24#define HUION_TABLET_RDESC_ORIG_SIZE 177
24 25
25/* Fixed Huion 580 report descriptor */ 26/* Fixed tablet report descriptor */
26static __u8 huion_580_rdesc_fixed[] = { 27static __u8 huion_tablet_rdesc_fixed[] = {
27 0x05, 0x0D, /* Usage Page (Digitizer), */ 28 0x05, 0x0D, /* Usage Page (Digitizer), */
28 0x09, 0x02, /* Usage (Pen), */ 29 0x09, 0x02, /* Usage (Pen), */
29 0xA1, 0x01, /* Collection (Application), */ 30 0xA1, 0x01, /* Collection (Application), */
@@ -72,10 +73,10 @@ static __u8 *huion_report_fixup(struct hid_device *hdev, __u8 *rdesc,
72 unsigned int *rsize) 73 unsigned int *rsize)
73{ 74{
74 switch (hdev->product) { 75 switch (hdev->product) {
75 case USB_DEVICE_ID_HUION_580: 76 case USB_DEVICE_ID_HUION_TABLET:
76 if (*rsize == HUION_580_RDESC_ORIG_SIZE) { 77 if (*rsize == HUION_TABLET_RDESC_ORIG_SIZE) {
77 rdesc = huion_580_rdesc_fixed; 78 rdesc = huion_tablet_rdesc_fixed;
78 *rsize = sizeof(huion_580_rdesc_fixed); 79 *rsize = sizeof(huion_tablet_rdesc_fixed);
79 } 80 }
80 break; 81 break;
81 } 82 }
@@ -108,11 +109,11 @@ static int huion_probe(struct hid_device *hdev, const struct hid_device_id *id)
108 int ret; 109 int ret;
109 struct usb_interface *intf = to_usb_interface(hdev->dev.parent); 110 struct usb_interface *intf = to_usb_interface(hdev->dev.parent);
110 111
111 /* Ignore interfaces 1 (mouse) and 2 (keyboard) for Huion 580 tablet, 112 /* Ignore interfaces 1 (mouse) and 2 (keyboard) for tablet,
112 * as they are not used 113 * as they are not used
113 */ 114 */
114 switch (id->product) { 115 switch (id->product) {
115 case USB_DEVICE_ID_HUION_580: 116 case USB_DEVICE_ID_HUION_TABLET:
116 if (intf->cur_altsetting->desc.bInterfaceNumber != 0x00) 117 if (intf->cur_altsetting->desc.bInterfaceNumber != 0x00)
117 return -ENODEV; 118 return -ENODEV;
118 break; 119 break;
@@ -131,7 +132,7 @@ static int huion_probe(struct hid_device *hdev, const struct hid_device_id *id)
131 } 132 }
132 133
133 switch (id->product) { 134 switch (id->product) {
134 case USB_DEVICE_ID_HUION_580: 135 case USB_DEVICE_ID_HUION_TABLET:
135 ret = huion_tablet_enable(hdev); 136 ret = huion_tablet_enable(hdev);
136 if (ret) { 137 if (ret) {
137 hid_err(hdev, "tablet enabling failed\n"); 138 hid_err(hdev, "tablet enabling failed\n");
@@ -158,7 +159,7 @@ static int huion_raw_event(struct hid_device *hdev, struct hid_report *report,
158} 159}
159 160
160static const struct hid_device_id huion_devices[] = { 161static const struct hid_device_id huion_devices[] = {
161 { HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_580) }, 162 { HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_TABLET) },
162 { } 163 { }
163}; 164};
164MODULE_DEVICE_TABLE(hid, huion_devices); 165MODULE_DEVICE_TABLE(hid, huion_devices);
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 48b66bbffc94..fe2f163b2b0c 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -448,7 +448,7 @@
448#define USB_DEVICE_ID_UGCI_FIGHTING 0x0030 448#define USB_DEVICE_ID_UGCI_FIGHTING 0x0030
449 449
450#define USB_VENDOR_ID_HUION 0x256c 450#define USB_VENDOR_ID_HUION 0x256c
451#define USB_DEVICE_ID_HUION_580 0x006e 451#define USB_DEVICE_ID_HUION_TABLET 0x006e
452 452
453#define USB_VENDOR_ID_IDEACOM 0x1cb6 453#define USB_VENDOR_ID_IDEACOM 0x1cb6
454#define USB_DEVICE_ID_IDEACOM_IDC6650 0x6650 454#define USB_DEVICE_ID_IDEACOM_IDC6650 0x6650