diff options
| -rw-r--r-- | MAINTAINERS | 2 | ||||
| -rw-r--r-- | drivers/hid/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/hid/hid-core.c | 1 | ||||
| -rw-r--r-- | drivers/hid/hid-ids.h | 4 | ||||
| -rw-r--r-- | drivers/hid/hid-magicmouse.c | 10 | ||||
| -rw-r--r-- | drivers/hid/hid-multitouch.c | 62 | ||||
| -rw-r--r-- | drivers/hid/usbhid/hid-quirks.c | 1 | ||||
| -rw-r--r-- | drivers/hid/usbhid/hiddev.c | 8 |
8 files changed, 59 insertions, 30 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 6c59eb90fdf4..502f2dd761eb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -6463,7 +6463,7 @@ M: Jiri Kosina <jkosina@suse.cz> | |||
| 6463 | L: linux-usb@vger.kernel.org | 6463 | L: linux-usb@vger.kernel.org |
| 6464 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git | 6464 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git |
| 6465 | S: Maintained | 6465 | S: Maintained |
| 6466 | F: Documentation/usb/hiddev.txt | 6466 | F: Documentation/hid/hiddev.txt |
| 6467 | F: drivers/hid/usbhid/ | 6467 | F: drivers/hid/usbhid/ |
| 6468 | 6468 | ||
| 6469 | USB ISP116X DRIVER | 6469 | USB ISP116X DRIVER |
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 67d2a7585934..36ca465c00ce 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig | |||
| @@ -305,6 +305,7 @@ config HID_MULTITOUCH | |||
| 305 | - 3M PCT touch screens | 305 | - 3M PCT touch screens |
| 306 | - ActionStar dual touch panels | 306 | - ActionStar dual touch panels |
| 307 | - Cando dual touch panels | 307 | - Cando dual touch panels |
| 308 | - Chunghwa panels | ||
| 308 | - CVTouch panels | 309 | - CVTouch panels |
| 309 | - Cypress TrueTouch panels | 310 | - Cypress TrueTouch panels |
| 310 | - Elo TouchSystems IntelliTouch Plus panels | 311 | - Elo TouchSystems IntelliTouch Plus panels |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index c957c4b4fe70..f7440e8ce3e7 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
| @@ -1359,6 +1359,7 @@ static const struct hid_device_id hid_have_special_driver[] = { | |||
| 1359 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR) }, | 1359 | { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR) }, |
| 1360 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) }, | 1360 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) }, |
| 1361 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS) }, | 1361 | { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS) }, |
| 1362 | { HID_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT, USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) }, | ||
| 1362 | { HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) }, | 1363 | { HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) }, |
| 1363 | { HID_USB_DEVICE(USB_VENDOR_ID_CVTOUCH, USB_DEVICE_ID_CVTOUCH_SCREEN) }, | 1364 | { HID_USB_DEVICE(USB_VENDOR_ID_CVTOUCH, USB_DEVICE_ID_CVTOUCH_SCREEN) }, |
| 1364 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) }, | 1365 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) }, |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 0b374a6d6db0..aecb5a4b8d6d 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
| @@ -173,6 +173,9 @@ | |||
| 173 | #define USB_DEVICE_ID_CHICONY_MULTI_TOUCH 0xb19d | 173 | #define USB_DEVICE_ID_CHICONY_MULTI_TOUCH 0xb19d |
| 174 | #define USB_DEVICE_ID_CHICONY_WIRELESS 0x0618 | 174 | #define USB_DEVICE_ID_CHICONY_WIRELESS 0x0618 |
| 175 | 175 | ||
| 176 | #define USB_VENDOR_ID_CHUNGHWAT 0x2247 | ||
| 177 | #define USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH 0x0001 | ||
| 178 | |||
| 176 | #define USB_VENDOR_ID_CIDC 0x1677 | 179 | #define USB_VENDOR_ID_CIDC 0x1677 |
| 177 | 180 | ||
| 178 | #define USB_VENDOR_ID_CMEDIA 0x0d8c | 181 | #define USB_VENDOR_ID_CMEDIA 0x0d8c |
| @@ -622,6 +625,7 @@ | |||
| 622 | #define USB_VENDOR_ID_UCLOGIC 0x5543 | 625 | #define USB_VENDOR_ID_UCLOGIC 0x5543 |
| 623 | #define USB_DEVICE_ID_UCLOGIC_TABLET_PF1209 0x0042 | 626 | #define USB_DEVICE_ID_UCLOGIC_TABLET_PF1209 0x0042 |
| 624 | #define USB_DEVICE_ID_UCLOGIC_TABLET_KNA5 0x6001 | 627 | #define USB_DEVICE_ID_UCLOGIC_TABLET_KNA5 0x6001 |
| 628 | #define USB_DEVICE_ID_UCLOGIC_TABLET_TWA60 0x0064 | ||
| 625 | #define USB_DEVICE_ID_UCLOGIC_TABLET_WP4030U 0x0003 | 629 | #define USB_DEVICE_ID_UCLOGIC_TABLET_WP4030U 0x0003 |
| 626 | #define USB_DEVICE_ID_UCLOGIC_TABLET_WP5540U 0x0004 | 630 | #define USB_DEVICE_ID_UCLOGIC_TABLET_WP5540U 0x0004 |
| 627 | #define USB_DEVICE_ID_UCLOGIC_TABLET_WP8060U 0x0005 | 631 | #define USB_DEVICE_ID_UCLOGIC_TABLET_WP8060U 0x0005 |
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c index a5eda4c8127a..0ec91c18a421 100644 --- a/drivers/hid/hid-magicmouse.c +++ b/drivers/hid/hid-magicmouse.c | |||
| @@ -501,17 +501,9 @@ static int magicmouse_probe(struct hid_device *hdev, | |||
| 501 | } | 501 | } |
| 502 | report->size = 6; | 502 | report->size = 6; |
| 503 | 503 | ||
| 504 | /* | ||
| 505 | * The device reponds with 'invalid report id' when feature | ||
| 506 | * report switching it into multitouch mode is sent to it. | ||
| 507 | * | ||
| 508 | * This results in -EIO from the _raw low-level transport callback, | ||
| 509 | * but there seems to be no other way of switching the mode. | ||
| 510 | * Thus the super-ugly hacky success check below. | ||
| 511 | */ | ||
| 512 | ret = hdev->hid_output_raw_report(hdev, feature, sizeof(feature), | 504 | ret = hdev->hid_output_raw_report(hdev, feature, sizeof(feature), |
| 513 | HID_FEATURE_REPORT); | 505 | HID_FEATURE_REPORT); |
| 514 | if (ret != -EIO) { | 506 | if (ret != sizeof(feature)) { |
| 515 | hid_err(hdev, "unable to request touch data (%d)\n", ret); | 507 | hid_err(hdev, "unable to request touch data (%d)\n", ret); |
| 516 | goto err_stop_hw; | 508 | goto err_stop_hw; |
| 517 | } | 509 | } |
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index ecd4d2db9e80..0b2dcd0ee591 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c | |||
| @@ -64,6 +64,7 @@ struct mt_device { | |||
| 64 | struct mt_class *mtclass; /* our mt device class */ | 64 | struct mt_class *mtclass; /* our mt device class */ |
| 65 | unsigned last_field_index; /* last field index of the report */ | 65 | unsigned last_field_index; /* last field index of the report */ |
| 66 | unsigned last_slot_field; /* the last field of a slot */ | 66 | unsigned last_slot_field; /* the last field of a slot */ |
| 67 | int last_mt_collection; /* last known mt-related collection */ | ||
| 67 | __s8 inputmode; /* InputMode HID feature, -1 if non-existent */ | 68 | __s8 inputmode; /* InputMode HID feature, -1 if non-existent */ |
| 68 | __u8 num_received; /* how many contacts we received */ | 69 | __u8 num_received; /* how many contacts we received */ |
| 69 | __u8 num_expected; /* expected last contact index */ | 70 | __u8 num_expected; /* expected last contact index */ |
| @@ -225,8 +226,10 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi, | |||
| 225 | cls->sn_move); | 226 | cls->sn_move); |
| 226 | /* touchscreen emulation */ | 227 | /* touchscreen emulation */ |
| 227 | set_abs(hi->input, ABS_X, field, cls->sn_move); | 228 | set_abs(hi->input, ABS_X, field, cls->sn_move); |
| 228 | td->last_slot_field = usage->hid; | 229 | if (td->last_mt_collection == usage->collection_index) { |
| 229 | td->last_field_index = field->index; | 230 | td->last_slot_field = usage->hid; |
| 231 | td->last_field_index = field->index; | ||
| 232 | } | ||
| 230 | return 1; | 233 | return 1; |
| 231 | case HID_GD_Y: | 234 | case HID_GD_Y: |
| 232 | if (quirks & MT_QUIRK_EGALAX_XYZ_FIXUP) | 235 | if (quirks & MT_QUIRK_EGALAX_XYZ_FIXUP) |
| @@ -237,8 +240,10 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi, | |||
| 237 | cls->sn_move); | 240 | cls->sn_move); |
| 238 | /* touchscreen emulation */ | 241 | /* touchscreen emulation */ |
| 239 | set_abs(hi->input, ABS_Y, field, cls->sn_move); | 242 | set_abs(hi->input, ABS_Y, field, cls->sn_move); |
| 240 | td->last_slot_field = usage->hid; | 243 | if (td->last_mt_collection == usage->collection_index) { |
| 241 | td->last_field_index = field->index; | 244 | td->last_slot_field = usage->hid; |
| 245 | td->last_field_index = field->index; | ||
| 246 | } | ||
| 242 | return 1; | 247 | return 1; |
| 243 | } | 248 | } |
| 244 | return 0; | 249 | return 0; |
| @@ -246,31 +251,40 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi, | |||
| 246 | case HID_UP_DIGITIZER: | 251 | case HID_UP_DIGITIZER: |
| 247 | switch (usage->hid) { | 252 | switch (usage->hid) { |
| 248 | case HID_DG_INRANGE: | 253 | case HID_DG_INRANGE: |
| 249 | td->last_slot_field = usage->hid; | 254 | if (td->last_mt_collection == usage->collection_index) { |
| 250 | td->last_field_index = field->index; | 255 | td->last_slot_field = usage->hid; |
| 256 | td->last_field_index = field->index; | ||
| 257 | } | ||
| 251 | return 1; | 258 | return 1; |
| 252 | case HID_DG_CONFIDENCE: | 259 | case HID_DG_CONFIDENCE: |
| 253 | td->last_slot_field = usage->hid; | 260 | if (td->last_mt_collection == usage->collection_index) { |
| 254 | td->last_field_index = field->index; | 261 | td->last_slot_field = usage->hid; |
| 262 | td->last_field_index = field->index; | ||
| 263 | } | ||
| 255 | return 1; | 264 | return 1; |
| 256 | case HID_DG_TIPSWITCH: | 265 | case HID_DG_TIPSWITCH: |
| 257 | hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH); | 266 | hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH); |
| 258 | input_set_capability(hi->input, EV_KEY, BTN_TOUCH); | 267 | input_set_capability(hi->input, EV_KEY, BTN_TOUCH); |
| 259 | td->last_slot_field = usage->hid; | 268 | if (td->last_mt_collection == usage->collection_index) { |
| 260 | td->last_field_index = field->index; | 269 | td->last_slot_field = usage->hid; |
| 270 | td->last_field_index = field->index; | ||
| 271 | } | ||
| 261 | return 1; | 272 | return 1; |
| 262 | case HID_DG_CONTACTID: | 273 | case HID_DG_CONTACTID: |
| 263 | input_mt_init_slots(hi->input, td->maxcontacts); | 274 | input_mt_init_slots(hi->input, td->maxcontacts); |
| 264 | td->last_slot_field = usage->hid; | 275 | td->last_slot_field = usage->hid; |
| 265 | td->last_field_index = field->index; | 276 | td->last_field_index = field->index; |
| 277 | td->last_mt_collection = usage->collection_index; | ||
| 266 | return 1; | 278 | return 1; |
| 267 | case HID_DG_WIDTH: | 279 | case HID_DG_WIDTH: |
| 268 | hid_map_usage(hi, usage, bit, max, | 280 | hid_map_usage(hi, usage, bit, max, |
| 269 | EV_ABS, ABS_MT_TOUCH_MAJOR); | 281 | EV_ABS, ABS_MT_TOUCH_MAJOR); |
| 270 | set_abs(hi->input, ABS_MT_TOUCH_MAJOR, field, | 282 | set_abs(hi->input, ABS_MT_TOUCH_MAJOR, field, |
| 271 | |||
