diff options
Diffstat (limited to 'drivers/hid/hid-apple.c')
-rw-r--r-- | drivers/hid/hid-apple.c | 63 |
1 files changed, 22 insertions, 41 deletions
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c index fd7f896b34f7..c6ab4ba60c52 100644 --- a/drivers/hid/hid-apple.c +++ b/drivers/hid/hid-apple.c | |||
@@ -312,13 +312,6 @@ static int apple_probe(struct hid_device *hdev, | |||
312 | unsigned int connect_mask = HID_CONNECT_DEFAULT; | 312 | unsigned int connect_mask = HID_CONNECT_DEFAULT; |
313 | int ret; | 313 | int ret; |
314 | 314 | ||
315 | /* return something else or move to hid layer? device will reside | ||
316 | allocated */ | ||
317 | if (id->bus == BUS_USB && (quirks & APPLE_IGNORE_MOUSE) && | ||
318 | to_usb_interface(hdev->dev.parent)->cur_altsetting-> | ||
319 | desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE) | ||
320 | return -ENODEV; | ||
321 | |||
322 | asc = kzalloc(sizeof(*asc), GFP_KERNEL); | 315 | asc = kzalloc(sizeof(*asc), GFP_KERNEL); |
323 | if (asc == NULL) { | 316 | if (asc == NULL) { |
324 | dev_err(&hdev->dev, "can't alloc apple descriptor\n"); | 317 | dev_err(&hdev->dev, "can't alloc apple descriptor\n"); |
@@ -367,38 +360,32 @@ static const struct hid_device_id apple_devices[] = { | |||
367 | .driver_data = APPLE_MIGHTYMOUSE | APPLE_INVERT_HWHEEL }, | 360 | .driver_data = APPLE_MIGHTYMOUSE | APPLE_INVERT_HWHEEL }, |
368 | 361 | ||
369 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI), | 362 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI), |
370 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 363 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, |
371 | APPLE_IGNORE_MOUSE }, | ||
372 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO), | 364 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO), |
373 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 365 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, |
374 | APPLE_IGNORE_MOUSE }, | ||
375 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI), | 366 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI), |
376 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 367 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, |
377 | APPLE_IGNORE_MOUSE }, | ||
378 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO), | 368 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO), |
379 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 369 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | |
380 | APPLE_IGNORE_MOUSE | APPLE_ISO_KEYBOARD }, | 370 | APPLE_ISO_KEYBOARD }, |
381 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS), | 371 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS), |
382 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 372 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, |
383 | APPLE_IGNORE_MOUSE }, | ||
384 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI), | 373 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI), |
385 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 374 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, |
386 | APPLE_IGNORE_MOUSE }, | ||
387 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO), | 375 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO), |
388 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 376 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | |
389 | APPLE_IGNORE_MOUSE | APPLE_ISO_KEYBOARD }, | 377 | APPLE_ISO_KEYBOARD }, |
390 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS), | 378 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS), |
391 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 379 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | |
392 | APPLE_IGNORE_MOUSE | APPLE_RDESC_JIS }, | 380 | APPLE_RDESC_JIS }, |
393 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI), | 381 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI), |
394 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 382 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, |
395 | APPLE_IGNORE_MOUSE }, | ||
396 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO), | 383 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO), |
397 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 384 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | |
398 | APPLE_IGNORE_MOUSE | APPLE_ISO_KEYBOARD }, | 385 | APPLE_ISO_KEYBOARD }, |
399 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS), | 386 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS), |
400 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 387 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | |
401 | APPLE_IGNORE_MOUSE | APPLE_RDESC_JIS}, | 388 | APPLE_RDESC_JIS }, |
402 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ANSI), | 389 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ANSI), |
403 | .driver_data = APPLE_HAS_FN }, | 390 | .driver_data = APPLE_HAS_FN }, |
404 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ISO), | 391 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ISO), |
@@ -406,14 +393,12 @@ static const struct hid_device_id apple_devices[] = { | |||
406 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_JIS), | 393 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_JIS), |
407 | .driver_data = APPLE_HAS_FN }, | 394 | .driver_data = APPLE_HAS_FN }, |
408 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI), | 395 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI), |
409 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 396 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, |
410 | APPLE_IGNORE_MOUSE }, | ||
411 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO), | 397 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO), |
412 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 398 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, |
413 | APPLE_IGNORE_MOUSE }, | ||
414 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS), | 399 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS), |
415 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 400 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | |
416 | APPLE_IGNORE_MOUSE | APPLE_RDESC_JIS }, | 401 | APPLE_RDESC_JIS }, |
417 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI), | 402 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI), |
418 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, | 403 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, |
419 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO), | 404 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO), |
@@ -422,25 +407,21 @@ static const struct hid_device_id apple_devices[] = { | |||
422 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS), | 407 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS), |
423 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, | 408 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, |
424 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI), | 409 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI), |
425 | .driver_data = APPLE_HAS_FN | APPLE_IGNORE_MOUSE }, | 410 | .driver_data = APPLE_HAS_FN }, |
426 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ISO), | 411 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ISO), |
427 | .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD | | 412 | .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD }, |
428 | APPLE_IGNORE_MOUSE }, | ||
429 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_JIS), | 413 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_JIS), |
430 | .driver_data = APPLE_HAS_FN | APPLE_IGNORE_MOUSE | APPLE_RDESC_JIS }, | 414 | .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS }, |
431 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI), | 415 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI), |
432 | .driver_data = APPLE_HAS_FN | APPLE_IGNORE_MOUSE }, | 416 | .driver_data = APPLE_HAS_FN }, |
433 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO), | 417 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO), |
434 | .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD | | 418 | .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD }, |
435 | APPLE_IGNORE_MOUSE }, | ||
436 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS), | 419 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS), |
437 | .driver_data = APPLE_HAS_FN | APPLE_IGNORE_MOUSE | APPLE_RDESC_JIS }, | 420 | .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS }, |
438 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY), | 421 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY), |
439 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 422 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, |
440 | APPLE_IGNORE_MOUSE }, | ||
441 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY), | 423 | { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY), |
442 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN | | 424 | .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, |
443 | APPLE_IGNORE_MOUSE }, | ||
444 | 425 | ||
445 | /* Apple wireless Mighty Mouse */ | 426 | /* Apple wireless Mighty Mouse */ |
446 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, 0x030c), | 427 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, 0x030c), |