diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2011-03-09 22:34:41 +0100 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2011-03-09 22:34:41 +0100 |
| commit | cde3defc861023c688877c9180df66a37746a204 (patch) | |
| tree | 68033a8faa8cecdde494168a7f5a82d4df050a37 /usr/src | |
| parent | e36747e4ddb1dc0f89a38798c0c669e10e5de5f2 (diff) | |
upgrade to natty (2.6.38-5)
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/dkms_source_tree/KERNEL_SOURCE_VERSION | 2 | ||||
| -rw-r--r-- | usr/src/dkms_source_tree/dkms.conf | 2 | ||||
| -rw-r--r-- | usr/src/dkms_source_tree/hid-core.c | 125 | ||||
| -rw-r--r-- | usr/src/dkms_source_tree/hid-debug.c | 4 | ||||
| -rw-r--r-- | usr/src/dkms_source_tree/hid-ids.h | 22 | ||||
| -rw-r--r-- | usr/src/dkms_source_tree/hid-input.c | 36 | ||||
| -rw-r--r-- | usr/src/dkms_source_tree/hidraw.c | 36 |
7 files changed, 137 insertions, 90 deletions
diff --git a/usr/src/dkms_source_tree/KERNEL_SOURCE_VERSION b/usr/src/dkms_source_tree/KERNEL_SOURCE_VERSION index ccb045a..3b97b43 100644 --- a/usr/src/dkms_source_tree/KERNEL_SOURCE_VERSION +++ b/usr/src/dkms_source_tree/KERNEL_SOURCE_VERSION | |||
| @@ -1 +1 @@ | |||
| 2.6.37-9-generic | 2.6.38-6-generic | ||
diff --git a/usr/src/dkms_source_tree/dkms.conf b/usr/src/dkms_source_tree/dkms.conf index 997bdc6..2bc2ab0 100644 --- a/usr/src/dkms_source_tree/dkms.conf +++ b/usr/src/dkms_source_tree/dkms.conf | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | NAME=hid | 1 | NAME=hid |
| 2 | VERSION=1.1.0 | 2 | VERSION=1.1.1 |
| 3 | PACKAGE_NAME="$NAME" | 3 | PACKAGE_NAME="$NAME" |
| 4 | PACKAGE_VERSION="$VERSION" | 4 | PACKAGE_VERSION="$VERSION" |
| 5 | MAKE[0]="make -C ${kernel_source_dir} | 5 | MAKE[0]="make -C ${kernel_source_dir} |
diff --git a/usr/src/dkms_source_tree/hid-core.c b/usr/src/dkms_source_tree/hid-core.c index 5ba6dda..d678cf3 100644 --- a/usr/src/dkms_source_tree/hid-core.c +++ b/usr/src/dkms_source_tree/hid-core.c | |||
| @@ -14,6 +14,8 @@ | |||
| 14 | * any later version. | 14 | * any later version. |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 18 | |||
| 17 | #include <linux/module.h> | 19 | #include <linux/module.h> |
| 18 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
| 19 | #include <linux/init.h> | 21 | #include <linux/init.h> |
| @@ -59,7 +61,8 @@ struct hid_report *hid_register_report(struct hid_device *device, unsigned type, | |||
| 59 | if (report_enum->report_id_hash[id]) | 61 | if (report_enum->report_id_hash[id]) |
| 60 | return report_enum->report_id_hash[id]; | 62 | return report_enum->report_id_hash[id]; |
| 61 | 63 | ||
| 62 | if (!(report = kzalloc(sizeof(struct hid_report), GFP_KERNEL))) | 64 | report = kzalloc(sizeof(struct hid_report), GFP_KERNEL); |
| 65 | if (!report) | ||
| 63 | return NULL; | 66 | return NULL; |
| 64 | 67 | ||
| 65 | if (id != 0) | 68 | if (id != 0) |
| @@ -90,8 +93,11 @@ static struct hid_field *hid_register_field(struct hid_report *report, unsigned | |||
| 90 | return NULL; | 93 | return NULL; |
| 91 | } | 94 | } |
| 92 | 95 | ||
| 93 | if (!(field = kzalloc(sizeof(struct hid_field) + usages * sizeof(struct hid_usage) | 96 | field = kzalloc((sizeof(struct hid_field) + |
| 94 | + values * sizeof(unsigned), GFP_KERNEL))) return NULL; | 97 | usages * sizeof(struct hid_usage) + |
| 98 | values * sizeof(unsigned)), GFP_KERNEL); | ||
| 99 | if (!field) | ||
| 100 | return NULL; | ||
| 95 | 101 | ||
| 96 | field->index = report->maxfield++; | 102 | field->index = report->maxfield++; |
| 97 | report->field[field->index] = field; | 103 | report->field[field->index] = field; |
| @@ -172,10 +178,14 @@ static int close_collection(struct hid_parser *parser) | |||
| 172 | 178 | ||
| 173 | static unsigned hid_lookup_collection(struct hid_parser *parser, unsigned type) | 179 | static unsigned hid_lookup_collection(struct hid_parser *parser, unsigned type) |
| 174 | { | 180 | { |
| 181 | struct hid_collection *collection = parser->device->collection; | ||
| 175 | int n; | 182 | int n; |
| 176 | for (n = parser->collection_stack_ptr - 1; n >= 0; n--) | 183 | |
| 177 | if (parser->device->collection[parser->collection_stack[n]].type == type) | 184 | for (n = parser->collection_stack_ptr - 1; n >= 0; n--) { |
| 178 | return parser->device->collection[parser->collection_stack[n]].usage; | 185 | unsigned index = parser->collection_stack[n]; |
| 186 | if (collection[index].type == type) | ||
| 187 | return collection[index].usage; | ||
| 188 | } | ||
| 179 | return 0; /* we know nothing about this usage type */ | 189 | return 0; /* we know nothing about this usage type */ |
| 180 | } | 190 | } |
| 181 | 191 | ||
| @@ -209,7 +219,8 @@ static int hid_add_field(struct hid_parser *parser, unsigned report_type, unsign | |||
| 209 | unsigned offset; | 219 | unsigned offset; |
| 210 | int i; | 220 | int i; |
| 211 | 221 | ||
| 212 | if (!(report = hid_register_report(parser->device, report_type, parser->global.report_id))) { | 222 | report = hid_register_report(parser->device, report_type, parser->global.report_id); |
| 223 | if (!report) { | ||
| 213 | dbg_hid("hid_register_report failed\n"); | 224 | dbg_hid("hid_register_report failed\n"); |
| 214 | return -1; | 225 | return -1; |
| 215 | } | 226 | } |
| @@ -227,7 +238,8 @@ static int hid_add_field(struct hid_parser *parser, unsigned report_type, unsign | |||
| 227 | 238 | ||
| 228 | usages = max_t(int, parser->local.usage_index, parser->global.report_count); | 239 | usages = max_t(int, parser->local.usage_index, parser->global.report_count); |
| 229 | 240 | ||
| 230 | if ((field = hid_register_field(report, usages, parser->global.report_count)) == NULL) | 241 | field = hid_register_field(report, usages, parser->global.report_count); |
| 242 | if (!field) | ||
| 231 | return 0; | 243 | return 0; |
| 232 | 244 | ||
| 233 | field->physical = hid_lookup_collection(parser, HID_COLLECTION_PHYSICAL); | 245 | field->physical = hid_lookup_collection(parser, HID_COLLECTION_PHYSICAL); |
| @@ -388,12 +400,6 @@ static int hid_parser_local(struct hid_parser *parser, struct hid_item *item) | |||
| 388 | __u32 data; | 400 | __u32 data; |
| 389 | unsigned n; | 401 | unsigned n; |
| 390 | 402 | ||
| 391 | /* Local delimiter could have value 0, which allows size to be 0 */ | ||
| 392 | if (item->size == 0 && item->tag != HID_LOCAL_ITEM_TAG_DELIMITER) { | ||
| 393 | dbg_hid("item data expected for local item\n"); | ||
| 394 | return -1; | ||
| 395 | } | ||
| 396 | |||
| 397 | data = item_udata(item); | 403 | data = item_udata(item); |
| 398 | 404 | ||
| 399 | switch (item->tag) { | 405 | switch (item->tag) { |
| @@ -658,13 +664,12 @@ int hid_parse_report(struct hid_device *device, __u8 *start, | |||
| 658 | return -ENOMEM; | 664 | return -ENOMEM; |
| 659 | device->rsize = size; | 665 | device->rsize = size; |
| 660 | 666 | ||
| 661 | parser = vmalloc(sizeof(struct hid_parser)); | 667 | parser = vzalloc(sizeof(struct hid_parser)); |
| 662 | if (!parser) { | 668 | if (!parser) { |
| 663 | ret = -ENOMEM; | 669 | ret = -ENOMEM; |
| 664 | goto err; | 670 | goto err; |
| 665 | } | 671 | } |
| 666 | 672 | ||
| 667 | memset(parser, 0, sizeof(struct hid_parser)); | ||
| 668 | parser->device = device; | 673 | parser->device = device; |
| 669 | 674 | ||
| 670 | end = start + size; | 675 | end = start + size; |
| @@ -678,7 +683,8 @@ int hid_parse_report(struct hid_device *device, __u8 *start, | |||
| 678 | 683 | ||
| 679 | if (dispatch_type[item.type](parser, &item)) { | 684 | if (dispatch_type[item.type](parser, &item)) { |
| 680 | dbg_hid("item %u %u %u %u parsing failed\n", | 685 | dbg_hid("item %u %u %u %u parsing failed\n", |
| 681 | item.format, (unsigned)item.size, (unsigned)item.type, (unsigned)item.tag); | 686 | item.format, (unsigned)item.size, |
| 687 | (unsigned)item.type, (unsigned)item.tag); | ||
| 682 | goto err; | 688 | goto err; |
| 683 | } | 689 | } |
| 684 | 690 | ||
| @@ -743,13 +749,14 @@ static u32 s32ton(__s32 value, unsigned n) | |||
| 743 | * Search linux-kernel and linux-usb-devel archives for "hid-core extract". | 749 | * Search linux-kernel and linux-usb-devel archives for "hid-core extract". |
| 744 | */ | 750 | */ |
| 745 | 751 | ||
| 746 | static __inline__ __u32 extract(__u8 *report, unsigned offset, unsigned n) | 752 | static __u32 extract(const struct hid_device *hid, __u8 *report, |
| 753 | unsigned offset, unsigned n) | ||
| 747 | { | 754 | { |
| 748 | u64 x; | 755 | u64 x; |
| 749 | 756 | ||
| 750 | if (n > 32) | 757 | if (n > 32) |
| 751 | printk(KERN_WARNING "HID: extract() called with n (%d) > 32! (%s)\n", | 758 | hid_warn(hid, "extract() called with n (%d) > 32! (%s)\n", |
| 752 | n, current->comm); | 759 | n, current->comm); |
| 753 | 760 | ||
| 754 | report += offset >> 3; /* adjust byte index */ | 761 | report += offset >> 3; /* adjust byte index */ |
| 755 | offset &= 7; /* now only need bit offset into one byte */ | 762 | offset &= 7; /* now only need bit offset into one byte */ |
| @@ -766,18 +773,19 @@ static __inline__ __u32 extract(__u8 *report, unsigned offset, unsigned n) | |||
| 766 | * endianness of register values by considering a register | 773 | * endianness of register values by considering a register |
| 767 | * a "cached" copy of the little endiad bit stream. | 774 | * a "cached" copy of the little endiad bit stream. |
| 768 | */ | 775 | */ |
| 769 | static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, __u32 value) | 776 | static void implement(const struct hid_device *hid, __u8 *report, |
| 777 | unsigned offset, unsigned n, __u32 value) | ||
| 770 | { | 778 | { |
| 771 | u64 x; | 779 | u64 x; |
| 772 | u64 m = (1ULL << n) - 1; | 780 | u64 m = (1ULL << n) - 1; |
| 773 | 781 | ||
| 774 | if (n > 32) | 782 | if (n > 32) |
| 775 | printk(KERN_WARNING "HID: implement() called with n (%d) > 32! (%s)\n", | 783 | hid_warn(hid, "%s() called with n (%d) > 32! (%s)\n", |
| 776 | n, current->comm); | 784 | __func__, n, current->comm); |
| 777 | 785 | ||
| 778 | if (value > m) | 786 | if (value > m) |
| 779 | printk(KERN_WARNING "HID: implement() called with too large value %d! (%s)\n", | 787 | hid_warn(hid, "%s() called with too large value %d! (%s)\n", |
| 780 | value, current->comm); | 788 | __func__, value, current->comm); |
| 781 | WARN_ON(value > m); | 789 | WARN_ON(value > m); |
| 782 | value &= m; | 790 | value &= m; |
| 783 | 791 | ||
| @@ -794,7 +802,7 @@ static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, __u3 | |||
| 794 | * Search an array for a value. | 802 | * Search an array for a value. |
| 795 | */ | 803 | */ |
| 796 | 804 | ||
| 797 | static __inline__ int search(__s32 *array, __s32 value, unsigned n) | 805 | static int search(__s32 *array, __s32 value, unsigned n) |
| 798 | { | 806 | { |
| 799 | while (n--) { | 807 | while (n--) { |
| 800 | if (*array++ == value) | 808 | if (*array++ == value) |
| @@ -893,18 +901,22 @@ static void hid_input_field(struct hid_device *hid, struct hid_field *field, | |||
| 893 | __s32 max = field->logical_maximum; | 901 | __s32 max = field->logical_maximum; |
| 894 | __s32 *value; | 902 | __s32 *value; |
| 895 | 903 | ||
| 896 | if (!(value = kmalloc(sizeof(__s32) * count, GFP_ATOMIC))) | 904 | value = kmalloc(sizeof(__s32) * count, GFP_ATOMIC); |
| 905 | if (!value) | ||
| 897 | return; | 906 | return; |
| 898 | 907 | ||
| 899 | for (n = 0; n < count; n++) { | 908 | for (n = 0; n < count; n++) { |
| 900 | 909 | ||
| 901 | value[n] = min < 0 ? snto32(extract(data, offset + n * size, size), size) : | 910 | value[n] = min < 0 ? |
| 902 | extract(data, offset + n * size, size); | 911 | snto32(extract(hid, data, offset + n * size, size), |
| 912 | size) : | ||
| 913 | extract(hid, data, offset + n * size, size); | ||
| 903 | 914 | ||
| 904 | if (!(field->flags & HID_MAIN_ITEM_VARIABLE) /* Ignore report if ErrorRollOver */ | 915 | /* Ignore report if ErrorRollOver */ |
| 905 | && value[n] >= min && value[n] <= max | 916 | if (!(field->flags & HID_MAIN_ITEM_VARIABLE) && |
| 906 | && field->usage[value[n] - min].hid == HID_UP_KEYBOARD + 1) | 917 | value[n] >= min && value[n] <= max && |
| 907 | goto exit; | 918 | field->usage[value[n] - min].hid == HID_UP_KEYBOARD + 1) |
| 919 | goto exit; | ||
| 908 | } | 920 | } |
| 909 | 921 | ||
| 910 | for (n = 0; n < count; n++) { | 922 | for (n = 0; n < count; n++) { |
| @@ -934,7 +946,8 @@ exit: | |||
| 934 | * Output the field into the report. | 946 | * Output the field into the report. |
| 935 | */ | 947 | */ |
| 936 | 948 | ||
| 937 | static void hid_output_field(struct hid_field *field, __u8 *data) | 949 | static void hid_output_field(const struct hid_device *hid, |
| 950 | struct hid_field *field, __u8 *data) | ||
| 938 | { | 951 | { |
| 939 | unsigned count = field->report_count; | 952 | unsigned count = field->report_count; |
| 940 | unsigned offset = field->report_offset; | 953 | unsigned offset = field->report_offset; |
| @@ -943,9 +956,11 @@ static void hid_output_field(struct hid_field *field, __u8 *data) | |||
| 943 | 956 | ||
| 944 | for (n = 0; n < count; n++) { | 957 | for (n = 0; n < count; n++) { |
| 945 | if (field->logical_minimum < 0) /* signed values */ | 958 | if (field->logical_minimum < 0) /* signed values */ |
| 946 | implement(data, offset + n * size, size, s32ton(field->value[n], size)); | 959 | implement(hid, data, offset + n * size, size, |
| 960 | s32ton(field->value[n], size)); | ||
| 947 | else /* unsigned values */ | 961 | else /* unsigned values */ |
| 948 | implement(data, offset + n * size, size, field->value[n]); | 962 | implement(hid, data, offset + n * size, size, |
| 963 | field->value[n]); | ||
| 949 | } | 964 | } |
| 950 | } | 965 | } |
| 951 | 966 | ||
| @@ -962,7 +977,7 @@ void hid_output_report(struct hid_report *report, __u8 *data) | |||
| 962 | 977 | ||
| 963 | memset(data, 0, ((report->size - 1) >> 3) + 1); | 978 | memset(data, 0, ((report->size - 1) >> 3) + 1); |
| 964 | for (n = 0; n < report->maxfield; n++) | 979 | for (n = 0; n < report->maxfield; n++) |
| 965 | hid_output_field(report->field[n], data); | 980 | hid_output_field(report->device, report->field[n], data); |
| 966 | } | 981 | } |
| 967 | EXPORT_SYMBOL_GPL(hid_output_report); | 982 | EXPORT_SYMBOL_GPL(hid_output_report); |
| 968 | 983 | ||
| @@ -1175,8 +1190,7 @@ int hid_connect(struct hid_device *hdev, unsigned int connect_mask) | |||
| 1175 | hdev->claimed |= HID_CLAIMED_HIDRAW; | 1190 | hdev->claimed |= HID_CLAIMED_HIDRAW; |
| 1176 | 1191 | ||
| 1177 | if (!hdev->claimed) { | 1192 | if (!hdev->claimed) { |
| 1178 | dev_err(&hdev->dev, "claimed by neither input, hiddev nor " | 1193 | hid_err(hdev, "claimed by neither input, hiddev nor hidraw\n"); |
| 1179 | "hidraw\n"); | ||
| 1180 | return -ENODEV; | 1194 | return -ENODEV; |
| 1181 | } | 1195 | } |
| 1182 | 1196 | ||
| @@ -1216,9 +1230,9 @@ int hid_connect(struct hid_device *hdev, unsigned int connect_mask) | |||
| 1216 | bus = "<UNKNOWN>"; | 1230 | bus = "<UNKNOWN>"; |
| 1217 | } | 1231 | } |
| 1218 | 1232 | ||
| 1219 | dev_info(&hdev->dev, "%s: %s HID v%x.%02x %s [%s] on %s\n", | 1233 | hid_info(hdev, "%s: %s HID v%x.%02x %s [%s] on %s\n", |
| 1220 | buf, bus, hdev->version >> 8, hdev->version & 0xff, | 1234 | buf, bus, hdev->version >> 8, hdev->version & 0xff, |
| 1221 | type, hdev->name, hdev->phys); | 1235 | type, hdev->name, hdev->phys); |
| 1222 | 1236 | ||
| 1223 | return 0; | 1237 | return 0; |
| 1224 | } | 1238 | } |
| @@ -1236,7 +1250,7 @@ void hid_disconnect(struct hid_device *hdev) | |||
| 1236 | EXPORT_SYMBOL_GPL(hid_disconnect); | 1250 | EXPORT_SYMBOL_GPL(hid_disconnect); |
| 1237 | 1251 | ||
| 1238 | /* a list of devices for which there is a specialized driver on HID bus */ | 1252 | /* a list of devices for which there is a specialized driver on HID bus */ |
| 1239 | static const struct hid_device_id hid_blacklist[] = { | 1253 | static const struct hid_device_id hid_have_special_driver[] = { |
| 1240 | { HID_USB_DEVICE(USB_VENDOR_ID_3M, USB_DEVICE_ID_3M1968) }, | 1254 | { HID_USB_DEVICE(USB_VENDOR_ID_3M, USB_DEVICE_ID_3M1968) }, |
| 1241 | { HID_USB_DEVICE(USB_VENDOR_ID_3M, USB_DEVICE_ID_3M2256) }, | 1255 | { HID_USB_DEVICE(USB_VENDOR_ID_3M, USB_DEVICE_ID_3M2256) }, |
| 1242 | { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU) }, | 1256 | { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU) }, |
| @@ -1298,30 +1312,39 @@ static const struct hid_device_id hid_blacklist[] = { | |||
| 1298 | { HID_USB_DEVICE(USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM) }, | 1312 | { HID_USB_DEVICE(USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM) }, |
| 1299 | { HID_USB_DEVICE(USB_VENDOR_ID_BTC, USB_DEVICE_ID_BTC_EMPREX_REMOTE) }, | 1313 | { HID_USB_DEVICE(USB_VENDOR_ID_BTC, USB_DEVICE_ID_BTC_EMPREX_REMOTE) }, |
| 1300 | { HID_USB_DEVICE(USB_VENDOR_ID_BTC, USB_DEVICE_ID_BTC_EMPREX_REMOTE_2) }, | 1314 | { HID_USB_DEVICE(USB_VENDOR_ID_BTC, USB_DEVICE_ID_BTC_EMPREX_REMOTE_2) }, |
| 1315 | { HID_USB_DEVICE(USB_VENDOR_ID_CANDO, USB_DEVICE_ID_CANDO_PIXCIR_MULTI_TOUCH) }, | ||
| 1301 | { HID_USB_DEVICE(USB_VENDOR_ID_CANDO, USB_DEVICE_ID_CANDO_MULTI_TOUCH) }, | 1316 | { HID_USB_DEVICE(USB_VENDOR_ID_CANDO, USB_DEVICE_ID_CANDO_MULTI_TOUCH) }, |
| 1317 | { HID_USB_DEVICE(USB_VENDOR_ID_CANDO, USB_DEVICE_ID_CANDO_MULTI_TOUCH_10_1) }, | ||
| 1302 | { HID_USB_DEVICE(USB_VENDOR_ID_CANDO, USB_DEVICE_ID_CANDO_MULTI_TOUCH_11_6) }, | 1318 | { HID_USB_DEVICE(USB_VENDOR_ID_CANDO, USB_DEVICE_ID_CANDO_MULTI_TOUCH_11_6) }, |
| 1303 | { HID_USB_DEVICE(USB_VENDOR_ID_CANDO, USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6) }, | 1319 | { HID_USB_DEVICE(USB_VENDOR_ID_CANDO, USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6) }, |
| 1304 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION) }, | 1320 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION) }, |
| 1305 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR) }, | 1321 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR) }, |
| 1306 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) }, | 1322 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) }, |
| 1323 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS) }, | ||
| 1307 | { HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) }, | 1324 | { HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) }, |
| 1308 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) }, | 1325 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) }, |
| 1309 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2) }, | 1326 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2) }, |
| 1310 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_3) }, | 1327 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_3) }, |
| 1311 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) }, | 1328 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) }, |
| 1329 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_TRUETOUCH) }, | ||
| 1312 | { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) }, | 1330 | { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) }, |
| 1313 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) }, | 1331 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) }, |
| 1314 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1) }, | 1332 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1) }, |
| 1315 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2) }, | 1333 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2) }, |
| 1334 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3) }, | ||
| 1335 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4) }, | ||
| 1316 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) }, | 1336 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) }, |
| 1337 | { HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) }, | ||
| 1317 | { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, | 1338 | { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, |
| 1318 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) }, | 1339 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) }, |
| 1319 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) }, | 1340 | { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) }, |
| 1341 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS) }, | ||
| 1320 | { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0003) }, | 1342 | { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0003) }, |
| 1321 | { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0012) }, | 1343 | { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0012) }, |
| 1322 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) }, | 1344 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) }, |
| 1323 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) }, | 1345 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) }, |
| 1324 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) }, | 1346 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) }, |
| 1347 | { HID_USB_DEVICE(USB_VENDOR_ID_HANVON, USB_DEVICE_ID_HANVON_MULTITOUCH) }, | ||
| 1325 | { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) }, | 1348 | { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) }, |
| 1326 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) }, | 1349 | { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) }, |
| 1327 | { HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) }, | 1350 | { HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) }, |
| @@ -1382,6 +1405,7 @@ static const struct hid_device_id hid_blacklist[] = { | |||
| 1382 | { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) }, | 1405 | { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) }, |
| 1383 | { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) }, | 1406 | { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) }, |
| 1384 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONE) }, | 1407 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONE) }, |
| 1408 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONEPLUS) }, | ||
| 1385 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRED) }, | 1409 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRED) }, |
| 1386 | { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) }, | 1410 | { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) }, |
| 1387 | { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) }, | 1411 | { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) }, |
| @@ -1401,16 +1425,15 @@ static const struct hid_device_id hid_blacklist[] = { | |||
| 1401 | { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654) }, | 1425 | { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654) }, |
| 1402 | { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb65a) }, | 1426 | { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb65a) }, |
| 1403 | { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) }, | 1427 | { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) }, |
| 1404 | { HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART) }, | ||
| 1405 | { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED2, USB_DEVICE_ID_TOPSEED2_RF_COMBO) }, | 1428 | { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED2, USB_DEVICE_ID_TOPSEED2_RF_COMBO) }, |
| 1406 | { HID_USB_DEVICE(USB_VENDOR_ID_TWINHAN, USB_DEVICE_ID_TWINHAN_IR_REMOTE) }, | 1429 | { HID_USB_DEVICE(USB_VENDOR_ID_TWINHAN, USB_DEVICE_ID_TWINHAN_IR_REMOTE) }, |
| 1430 | { HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART) }, | ||
| 1407 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_PF1209) }, | 1431 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_PF1209) }, |
| 1408 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP4030U) }, | 1432 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP4030U) }, |
| 1409 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP5540U) }, | 1433 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP5540U) }, |
| 1410 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP8060U) }, | 1434 | { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP8060U) }, |
| 1411 | { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SMARTJOY_PLUS) }, | 1435 | { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SMARTJOY_PLUS) }, |
| 1412 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH) }, | 1436 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH) }, |
| 1413 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH) }, | ||
| 1414 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SLIM_TABLET_5_8_INCH) }, | 1437 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SLIM_TABLET_5_8_INCH) }, |
| 1415 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SLIM_TABLET_12_1_INCH) }, | 1438 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SLIM_TABLET_12_1_INCH) }, |
| 1416 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH) }, | 1439 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH) }, |
| @@ -1511,9 +1534,9 @@ static int hid_bus_match(struct device *dev, struct device_driver *drv) | |||
| 1511 | if (!hid_match_device(hdev, hdrv)) | 1534 | if (!hid_match_device(hdev, hdrv)) |
| 1512 | return 0; | 1535 | return 0; |
| 1513 | 1536 | ||
| 1514 | /* generic wants all non-blacklisted */ | 1537 | /* generic wants all that don't have specialized driver */ |
| 1515 | if (!strncmp(hdrv->name, "generic-", 8)) | 1538 | if (!strncmp(hdrv->name, "generic-", 8)) |
| 1516 | return !hid_match_id(hdev, hid_blacklist); | 1539 | return !hid_match_id(hdev, hid_have_special_driver); |
| 1517 | 1540 | ||
| 1518 | return 1; | 1541 | return 1; |
| 1519 | } | 1542 | } |
| @@ -1619,10 +1642,10 @@ static const struct hid_device_id hid_ignore_list[] = { | |||
| 1619 | { HID_USB_DEVICE(USB_VENDOR_ID_DEALEXTREAME, USB_DEVICE_ID_DEALEXTREAME_RADIO_SI4701) }, | 1642 | { HID_USB_DEVICE(USB_VENDOR_ID_DEALEXTREAME, USB_DEVICE_ID_DEALEXTREAME_RADIO_SI4701) }, |
| 1620 | { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE) }, | 1643 | { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE) }, |
| 1621 | { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, | 1644 | { HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) }, |
| 1645 | { HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) }, | ||
| 1622 | { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, | 1646 | { HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) }, |
| 1623 | { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, | 1647 | { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, |
| 1624 | { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, | 1648 | { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) }, |
| 1625 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0001) }, | ||
| 1626 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0002) }, | 1649 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0002) }, |
| 1627 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0003) }, | 1650 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0003) }, |
| 1628 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0004) }, | 1651 | { HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, 0x0004) }, |
| @@ -1969,12 +1992,12 @@ static int __init hid_init(void) | |||
| 1969 | int ret; | 1992 | int ret; |
| 1970 | 1993 | ||
| 1971 | if (hid_debug) | 1994 | if (hid_debug) |
| 1972 | printk(KERN_WARNING "HID: hid_debug is now used solely for parser and driver debugging.\n" | 1995 | pr_warn("hid_debug is now used solely for parser and driver debugging.\n" |
| 1973 | "HID: debugfs is now used for inspecting the device (report descriptor, reports)\n"); | 1996 | "debugfs is now used for inspecting the device (report descriptor, reports)\n"); |
| 1974 | 1997 | ||
| 1975 | ret = bus_register(&hid_bus_type); | 1998 | ret = bus_register(&hid_bus_type); |
| 1976 | if (ret) { | 1999 | if (ret) { |
| 1977 | printk(KERN_ERR "HID: can't register hid bus\n"); | 2000 | pr_err("can't register hid bus\n"); |
| 1978 | goto err; | 2001 | goto err; |
| 1979 | } | 2002 | } |
| 1980 | 2003 | ||
diff --git a/usr/src/dkms_source_tree/hid-debug.c b/usr/src/dkms_source_tree/hid-debug.c index 75c5e23..555382f 100644 --- a/usr/src/dkms_source_tree/hid-debug.c +++ b/usr/src/dkms_source_tree/hid-debug.c | |||
| @@ -26,6 +26,8 @@ | |||
| 26 | * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic | 26 | * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic |
| 27 | */ | 27 | */ |
| 28 | 28 | ||
| 29 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 30 | |||
| 29 | #include <linux/debugfs.h> | 31 | #include <linux/debugfs.h> |
| 30 | #include <linux/seq_file.h> | 32 | #include <linux/seq_file.h> |
| 31 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
| @@ -393,7 +395,7 @@ char *hid_resolv_usage(unsigned usage, struct seq_file *f) { | |||
| 393 | 395 | ||
| 394 | buf = resolv_usage_page(usage >> 16, f); | 396 | buf = resolv_usage_page(usage >> 16, f); |
| 395 | if (IS_ERR(buf)) { | 397 | if (IS_ERR(buf)) { |
| 396 | printk(KERN_ERR "error allocating HID debug buffer\n"); | 398 | pr_err("error allocating HID debug buffer\n"); |
| 397 | return NULL; | 399 | return NULL; |
| 398 | } | 400 | } |
| 399 | 401 | ||
diff --git a/usr/src/dkms_source_tree/hid-ids.h b/usr/src/dkms_source_tree/hid-ids.h index e07a944..92a0d61 100644 --- a/usr/src/dkms_source_tree/hid-ids.h +++ b/usr/src/dkms_source_tree/hid-ids.h | |||
| @@ -140,7 +140,9 @@ | |||
| 140 | #define USB_DEVICE_ID_BTC_EMPREX_REMOTE_2 0x5577 | 140 | #define USB_DEVICE_ID_BTC_EMPREX_REMOTE_2 0x5577 |
| 141 | 141 | ||
| 142 | #define USB_VENDOR_ID_CANDO 0x2087 | 142 | #define USB_VENDOR_ID_CANDO 0x2087 |
| 143 | #define USB_DEVICE_ID_CANDO_PIXCIR_MULTI_TOUCH 0x0703 | ||
| 143 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH 0x0a01 | 144 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH 0x0a01 |
| 145 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH_10_1 0x0a02 | ||
| 144 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH_11_6 0x0b03 | 146 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH_11_6 0x0b03 |
| 145 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6 0x0f01 | 147 | #define USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6 0x0f01 |
| 146 | 148 | ||
| @@ -162,6 +164,7 @@ | |||
| 162 | #define USB_VENDOR_ID_CHICONY 0x04f2 | 164 | #define USB_VENDOR_ID_CHICONY 0x04f2 |
| 163 | #define USB_DEVICE_ID_CHICONY_TACTICAL_PAD 0x0418 | 165 | #define USB_DEVICE_ID_CHICONY_TACTICAL_PAD 0x0418 |
| 164 | #define USB_DEVICE_ID_CHICONY_MULTI_TOUCH 0xb19d | 166 | #define USB_DEVICE_ID_CHICONY_MULTI_TOUCH 0xb19d |
| 167 | #define USB_DEVICE_ID_CHICONY_WIRELESS 0x0618 | ||
| 165 | 168 | ||
| 166 | #define USB_VENDOR_ID_CIDC 0x1677 | 169 | #define USB_VENDOR_ID_CIDC 0x1677 |
| 167 | 170 | ||
| @@ -185,6 +188,7 @@ | |||
| 185 | #define USB_DEVICE_ID_CYPRESS_BARCODE_1 0xde61 | 188 | #define USB_DEVICE_ID_CYPRESS_BARCODE_1 0xde61 |
| 186 | #define USB_DEVICE_ID_CYPRESS_BARCODE_2 0xde64 | 189 | #define USB_DEVICE_ID_CYPRESS_BARCODE_2 0xde64 |
| 187 | #define USB_DEVICE_ID_CYPRESS_BARCODE_3 0xbca1 | 190 | #define USB_DEVICE_ID_CYPRESS_BARCODE_3 0xbca1 |
| 191 | #define USB_DEVICE_ID_CYPRESS_TRUETOUCH 0xc001 | ||
| 188 | 192 | ||
| 189 | #define USB_VENDOR_ID_DEALEXTREAME 0x10c5 | 193 | #define USB_VENDOR_ID_DEALEXTREAME 0x10c5 |
| 190 | #define USB_DEVICE_ID_DEALEXTREAME_RADIO_SI4701 0x819a | 194 | #define USB_DEVICE_ID_DEALEXTREAME_RADIO_SI4701 0x819a |
| @@ -203,13 +207,20 @@ | |||
| 203 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH 0x480d | 207 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH 0x480d |
| 204 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1 0x720c | 208 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1 0x720c |
| 205 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2 0x72a1 | 209 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2 0x72a1 |
| 210 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3 0x480e | ||
| 211 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4 0x726b | ||
| 206 | 212 | ||
| 207 | #define USB_VENDOR_ID_ELECOM 0x056e | 213 | #define USB_VENDOR_ID_ELECOM 0x056e |
| 208 | #define USB_DEVICE_ID_ELECOM_BM084 0x0061 | 214 | #define USB_DEVICE_ID_ELECOM_BM084 0x0061 |
| 209 | 215 | ||
| 216 | #define USB_VENDOR_ID_DREAM_CHEEKY 0x1d34 | ||
| 217 | |||
| 210 | #define USB_VENDOR_ID_ELO 0x04E7 | 218 | #define USB_VENDOR_ID_ELO 0x04E7 |
| 211 | #define USB_DEVICE_ID_ELO_TS2700 0x0020 | 219 | #define USB_DEVICE_ID_ELO_TS2700 0x0020 |
| 212 | 220 | ||
| 221 | #define USB_VENDOR_ID_EMS 0x2006 | ||
| 222 | #define USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II 0x0118 | ||
| 223 | |||
| 213 | #define USB_VENDOR_ID_ESSENTIAL_REALITY 0x0d7f | 224 | #define USB_VENDOR_ID_ESSENTIAL_REALITY 0x0d7f |
| 214 | #define USB_DEVICE_ID_ESSENTIAL_REALITY_P5 0x0100 | 225 | #define USB_DEVICE_ID_ESSENTIAL_REALITY_P5 0x0100 |
| 215 | 226 | ||
| @@ -228,6 +239,7 @@ | |||
| 228 | #define USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR 0x0002 | 239 | #define USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR 0x0002 |
| 229 | 240 | ||
| 230 | #define USB_VENDOR_ID_GENERAL_TOUCH 0x0dfc | 241 | #define USB_VENDOR_ID_GENERAL_TOUCH 0x0dfc |
| 242 | #define USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS 0x0001 | ||
| 231 | 243 | ||
| 232 | #define USB_VENDOR_ID_GLAB 0x06c2 | 244 | #define USB_VENDOR_ID_GLAB 0x06c2 |
| 233 | #define USB_DEVICE_ID_4_PHIDGETSERVO_30 0x0038 | 245 | #define USB_DEVICE_ID_4_PHIDGETSERVO_30 0x0038 |
| @@ -310,6 +322,9 @@ | |||
| 310 | #define USB_DEVICE_ID_HANWANG_TABLET_FIRST 0x5000 | 322 | #define USB_DEVICE_ID_HANWANG_TABLET_FIRST 0x5000 |
| 311 | #define USB_DEVICE_ID_HANWANG_TABLET_LAST 0x8fff | 323 | #define USB_DEVICE_ID_HANWANG_TABLET_LAST 0x8fff |
| 312 | 324 | ||
| 325 | #define USB_VENDOR_ID_HANVON 0x20b3 | ||
| 326 | #define USB_DEVICE_ID_HANVON_MULTITOUCH 0x0a18 | ||
| 327 | |||
| 313 | #define USB_VENDOR_ID_HAPP 0x078b | 328 | #define USB_VENDOR_ID_HAPP 0x078b |
| 314 | #define USB_DEVICE_ID_UGCI_DRIVING 0x0010 | 329 | #define USB_DEVICE_ID_UGCI_DRIVING 0x0010 |
| 315 | #define USB_DEVICE_ID_UGCI_FLYING 0x0020 | 330 | #define USB_DEVICE_ID_UGCI_FLYING 0x0020 |
| @@ -482,6 +497,7 @@ | |||
| 482 | 497 | ||
| 483 | #define USB_VENDOR_ID_ROCCAT 0x1e7d | 498 | #define USB_VENDOR_ID_ROCCAT 0x1e7d |
| 484 | #define USB_DEVICE_ID_ROCCAT_KONE 0x2ced | 499 | #define USB_DEVICE_ID_ROCCAT_KONE 0x2ced |
| 500 | #define USB_DEVICE_ID_ROCCAT_KONEPLUS 0x2d51 | ||
| 485 | #define USB_DEVICE_ID_ROCCAT_PYRA_WIRED 0x2c24 | 501 | #define USB_DEVICE_ID_ROCCAT_PYRA_WIRED 0x2c24 |
| 486 | #define USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS 0x2cf6 | 502 | #define USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS 0x2cf6 |
| 487 | 503 | ||
| @@ -552,7 +568,6 @@ | |||
| 552 | 568 | ||
| 553 | #define USB_VENDOR_ID_WACOM 0x056a | 569 | #define USB_VENDOR_ID_WACOM 0x056a |
| 554 | #define USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH 0x81 | 570 | #define USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH 0x81 |
| 555 | #define USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH 0xbd | ||
| 556 | 571 | ||
| 557 | #define USB_VENDOR_ID_WALTOP 0x172f | 572 | #define USB_VENDOR_ID_WALTOP 0x172f |
| 558 | #define USB_DEVICE_ID_WALTOP_SLIM_TABLET_5_8_INCH 0x0032 | 573 | #define USB_DEVICE_ID_WALTOP_SLIM_TABLET_5_8_INCH 0x0032 |
| @@ -580,9 +595,4 @@ | |||
| 580 | #define USB_VENDOR_ID_ZYDACRON 0x13EC | 595 | #define USB_VENDOR_ID_ZYDACRON 0x13EC |
| 581 | #define USB_DEVICE_ID_ZYDACRON_REMOTE_CONTROL 0x0006 | 596 | #define USB_DEVICE_ID_ZYDACRON_REMOTE_CONTROL 0x0006 |
| 582 | 597 | ||
| 583 | #define USB_VENDOR_ID_KYE 0x0458 | ||
| 584 | #define USB_DEVICE_ID_KYE_ERGO_525V 0x0087 | ||
| 585 | #define USB_DEVICE_ID_KYE_GPEN_560 0x5003 | ||
| 586 | |||
| 587 | |||
| 588 | #endif | 598 | #endif |
diff --git a/usr/src/dkms_source_tree/hid-input.c b/usr/src/dkms_source_tree/hid-input.c index d8d372b..05709e3 100644 --- a/usr/src/dkms_source_tree/hid-input.c +++ b/usr/src/dkms_source_tree/hid-input.c | |||
| @@ -319,21 +319,21 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
| 319 | 319 | ||
| 320 | switch (field->application) { | 320 | switch (field->application) { |
| 321 | case HID_GD_MOUSE: | 321 | case HID_GD_MOUSE: |
| 322 | case HID_GD_POINTER: code += 0x110; break; | 322 | case HID_GD_POINTER: code += BTN_MOUSE; break; |
| 323 | case HID_GD_JOYSTICK: | 323 | case HID_GD_JOYSTICK: |
| 324 | if (code <= 0xf) | 324 | if (code <= 0xf) |
| 325 | code += BTN_JOYSTICK; | 325 | code += BTN_JOYSTICK; |
| 326 | else | 326 | else |
| 327 | code += BTN_TRIGGER_HAPPY; | 327 | code += BTN_TRIGGER_HAPPY; |
| 328 | break; | 328 | break; |
| 329 | case HID_GD_GAMEPAD: code += 0x130; break; | 329 | case HID_GD_GAMEPAD: code += BTN_GAMEPAD; break; |
| 330 | default: | 330 | default: |
| 331 | switch (field->physical) { | 331 | switch (field->physical) { |
| 332 | case HID_GD_MOUSE: | 332 | case HID_GD_MOUSE: |
| 333 | case HID_GD_POINTER: code += 0x110; break; | 333 | case HID_GD_POINTER: code += BTN_MOUSE; break; |
| 334 | case HID_GD_JOYSTICK: code += 0x120; break; | 334 | case HID_GD_JOYSTICK: code += BTN_JOYSTICK; break; |
| 335 | case HID_GD_GAMEPAD: code += 0x130; break; | 335 | case HID_GD_GAMEPAD: code += BTN_GAMEPAD; break; |
| 336 | default: code += 0x100; | 336 | default: code += BTN_MISC; |
| 337 | } | 337 | } |
| 338 | } | 338 | } |
| 339 | 339 | ||
| @@ -817,14 +817,21 @@ static int hidinput_open(struct input_dev *dev) | |||
| 817 | { | 817 | { |
| 818 | struct hid_device *hid = input_get_drvdata(dev); | 818 | struct hid_device *hid = input_get_drvdata(dev); |
| 819 | 819 | ||
| 820 | return hid->ll_driver->open(hid); | 820 | return hid_hw_open(hid); |
| 821 | } | 821 | } |
| 822 | 822 | ||
| 823 | static void hidinput_close(struct input_dev *dev) | 823 | static void hidinput_close(struct input_dev *dev) |
| 824 | { | 824 | { |
| 825 | struct hid_device *hid = input_get_drvdata(dev); | 825 | struct hid_device *hid = input_get_drvdata(dev); |
| 826 | 826 | ||
| 827 | hid->ll_driver->close(hid); | 827 | hid_hw_close(hid); |
| 828 | } | ||
| 829 | |||
| 830 | static void report_features(struct hid_device *hid) | ||
| 831 | { | ||
| 832 | /* no feature report support in this test, since it is in flux */ | ||
| 833 | |||
| 834 | return; | ||
| 828 | } | 835 | } |
| 829 | 836 | ||
| 830 | /* | 837 | /* |
| @@ -839,7 +846,6 @@ int hidinput_connect(struct hid_device *hid, unsigned int force) | |||
| 839 | struct hid_input *hidinput = NULL; | 846 | struct hid_input *hidinput = NULL; |
| 840 | struct input_dev *input_dev; | 847 | struct input_dev *input_dev; |
| 841 | int i, j, k; | 848 | int i, j, k; |
| 842 | int max_report_type = HID_OUTPUT_REPORT; | ||
| 843 | 849 | ||
| 844 | INIT_LIST_HEAD(&hid->inputs); | 850 | INIT_LIST_HEAD(&hid->inputs); |
| 845 | 851 | ||
| @@ -856,10 +862,13 @@ int hidinput_connect(struct hid_device *hid, unsigned int force) | |||
| 856 | return -1; | 862 | return -1; |
| 857 | } | 863 | } |
| 858 | 864 | ||
| 859 | if (hid->quirks & HID_QUIRK_SKIP_OUTPUT_REPORTS) | 865 | report_features(hid); |
| 860 | max_report_type = HID_INPUT_REPORT; | 866 | |
| 867 | for (k = HID_INPUT_REPORT; k <= HID_OUTPUT_REPORT; k++) { | ||
| 868 | if (k == HID_OUTPUT_REPORT && | ||
| 869 | hid->quirks & HID_QUIRK_SKIP_OUTPUT_REPORTS) | ||
| 870 | continue; | ||
| 861 | 871 | ||
| 862 | for (k = HID_INPUT_REPORT; k <= max_report_type; k++) | ||
| 863 | list_for_each_entry(report, &hid->report_enum[k].report_list, list) { | 872 | list_for_each_entry(report, &hid->report_enum[k].report_list, list) { |
| 864 | 873 | ||
| 865 | if (!report->maxfield) | 874 | if (!report->maxfield) |
| @@ -871,7 +880,7 @@ int hidinput_connect(struct hid_device *hid, unsigned int force) | |||
| 871 | if (!hidinput || !input_dev) { | 880 | if (!hidinput || !input_dev) { |
| 872 | kfree(hidinput); | 881 | kfree(hidinput); |
| 873 | input_free_device(input_dev); | 882 | input_free_device(input_dev); |
| 874 | err_hid("Out of memory during hid input probe"); | 883 | hid_err(hid, "Out of memory during hid input probe\n"); |
| 875 | goto out_unwind; | 884 | goto out_unwind; |
| 876 | } | 885 | } |
| 877 | 886 | ||
| @@ -912,6 +921,7 @@ int hidinput_connect(struct hid_device *hid, unsigned int force) | |||
| 912 | hidinput = NULL; | 921 | hidinput = NULL; |
| 913 | } | 922 | } |
| 914 | } | 923 | } |
| 924 | } | ||
| 915 | 925 | ||
| 916 | if (hidinput && input_register_device(hidinput->input)) | 926 | if (hidinput && input_register_device(hidinput->input)) |
| 917 | goto out_cleanup; | 927 | goto out_cleanup; |
diff --git a/usr/src/dkms_source_tree/hidraw.c b/usr/src/dkms_source_tree/hidraw.c index e1f0748..468e87b 100644 --- a/usr/src/dkms_source_tree/hidraw.c +++ b/usr/src/dkms_source_tree/hidraw.c | |||
| @@ -19,6 +19,8 @@ | |||
| 19 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | 19 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 23 | |||
| 22 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
| 23 | #include <linux/module.h> | 25 | #include <linux/module.h> |
| 24 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
| @@ -122,15 +124,15 @@ static ssize_t hidraw_write(struct file *file, const char __user *buffer, size_t | |||
| 122 | } | 124 | } |
| 123 | 125 | ||
| 124 | if (count > HID_MAX_BUFFER_SIZE) { | 126 | if (count > HID_MAX_BUFFER_SIZE) { |
| 125 | printk(KERN_WARNING "hidraw: pid %d passed too large report\n", | 127 | hid_warn(dev, "pid %d passed too large report\n", |
| 126 | task_pid_nr(current)); | 128 | task_pid_nr(current)); |
| 127 | ret = -EINVAL; | 129 | ret = -EINVAL; |
| 128 | goto out; | 130 | goto out; |
| 129 | } | 131 | } |
| 130 | 132 | ||
| 131 | if (count < 2) { | 133 | if (count < 2) { |
| 132 | printk(KERN_WARNING "hidraw: pid %d passed too short report\n", | 134 | hid_warn(dev, "pid %d passed too short report\n", |
| 133 | task_pid_nr(current)); | 135 | task_pid_nr(current)); |
| 134 | ret = -EINVAL; | 136 | ret = -EINVAL; |
| 135 | goto out; | 137 | goto out; |
| 136 | } | 138 | } |
| @@ -192,15 +194,13 @@ static int hidraw_open(struct inode *inode, struct file *file) | |||
| 192 | 194 | ||
| 193 | dev = hidraw_table[minor]; | 195 | dev = hidraw_table[minor]; |
| 194 | if (!dev->open++) { | 196 | if (!dev->open++) { |
| 195 | if (dev->hid->ll_driver->power) { | 197 | err = hid_hw_power(dev->hid, PM_HINT_FULLON); |
| 196 | err = dev->hid->ll_driver->power(dev->hid, PM_HINT_FULLON); | 198 | if (err < 0) |
| 197 | if (err < 0) | 199 | goto out_unlock; |
| 198 | goto out_unlock; | 200 | |
| 199 | } | 201 | err = hid_hw_open(dev->hid); |
| 200 | err = dev->hid->ll_driver->open(dev->hid); | ||
| 201 | if (err < 0) { | 202 | if (err < 0) { |
| 202 | if (dev->hid->ll_driver->power) | 203 | hid_hw_power(dev->hid, PM_HINT_NORMAL); |
| 203 | dev->hid->ll_driver->power(dev->hid, PM_HINT_NORMAL); | ||
| 204 | dev->open--; | 204 | dev->open--; |
| 205 | } | 205 | } |
| 206 | } | 206 | } |
| @@ -229,9 +229,8 @@ static int hidraw_release(struct inode * inode, struct file * file) | |||
| 229 | dev = hidraw_table[minor]; | 229 | dev = hidraw_table[minor]; |
| 230 | if (!--dev->open) { | 230 | if (!--dev->open) { |
| 231 | if (list->hidraw->exist) { | 231 | if (list->hidraw->exist) { |
| 232 | if (dev->hid->ll_driver->power) | 232 | hid_hw_power(dev->hid, PM_HINT_NORMAL); |
| 233 | dev->hid->ll_driver->power(dev->hid, PM_HINT_NORMAL); | 233 | hid_hw_close(dev->hid); |
| 234 | dev->hid->ll_driver->close(dev->hid); | ||
| 235 | } else { | 234 | } else { |
| 236 | kfree(list->hidraw); | 235 | kfree(list->hidraw); |
| 237 | } | 236 | } |
| @@ -345,6 +344,9 @@ static const struct file_operations hidraw_ops = { | |||
| 345 | .open = hidraw_open, | 344 | .open = hidraw_open, |
| 346 | .release = hidraw_release, | 345 | .release = hidraw_release, |
| 347 | .unlocked_ioctl = hidraw_ioctl, | 346 | .unlocked_ioctl = hidraw_ioctl, |
| 347 | #ifdef CONFIG_COMPAT | ||
| 348 | .compat_ioctl = hidraw_ioctl, | ||
| 349 | #endif | ||
| 348 | .llseek = noop_llseek, | 350 | .llseek = noop_llseek, |
| 349 | }; | 351 | }; |
| 350 | 352 | ||
| @@ -433,7 +435,7 @@ void hidraw_disconnect(struct hid_device *hid) | |||
| 433 | device_destroy(hidraw_class, MKDEV(hidraw_major, hidraw->minor)); | 435 | device_destroy(hidraw_class, MKDEV(hidraw_major, hidraw->minor)); |
| 434 | 436 | ||
| 435 | if (hidraw->open) { | 437 | if (hidraw->open) { |
| 436 | hid->ll_driver->close(hid); | 438 | hid_hw_close(hid); |
| 437 | wake_up_interruptible(&hidraw->wait); | 439 | wake_up_interruptible(&hidraw->wait); |
| 438 | } else { | 440 | } else { |
| 439 | kfree(hidraw); | 441 | kfree(hidraw); |
| @@ -452,7 +454,7 @@ int __init hidraw_init(void) | |||
| 452 | hidraw_major = MAJOR(dev_id); | 454 | hidraw_major = MAJOR(dev_id); |
| 453 | 455 | ||
| 454 | if (result < 0) { | 456 | if (result < 0) { |
| 455 | printk(KERN_WARNING "hidraw: can't get major number\n"); | 457 | pr_warn("can't get major number\n"); |
| 456 | result = 0; | 458 | result = 0; |
| 457 | goto out; | 459 | goto out; |
| 458 | } | 460 | } |
