diff options
Diffstat (limited to 'bcm5974.c')
| -rw-r--r-- | bcm5974.c | 26 |
1 files changed, 23 insertions, 3 deletions
| @@ -404,14 +404,33 @@ exit: | |||
| 404 | err("bcm5974: trackpad urb failed: %d", error); | 404 | err("bcm5974: trackpad urb failed: %d", error); |
| 405 | } | 405 | } |
| 406 | 406 | ||
| 407 | /* | ||
| 408 | * The Wellspring trackpad, like many recent Apple trackpads, share | ||
| 409 | * the usb device with the keyboard. Since keyboards are usually | ||
| 410 | * handled by the HID system, the device ends up being handled by two | ||
| 411 | * modules. Setting up the device therefore becomes slightly | ||
| 412 | * complicated. To enable multitouch features, a mode switch is | ||
| 413 | * required, which is usually applied via the control interface of the | ||
| 414 | * device. It can be argued where this switch should take place. In | ||
| 415 | * some drivers, like appletouch, the switch is made during | ||
| 416 | * probe. However, the hid module may also alter the state of the | ||
| 417 | * device, resulting in trackpad malfunction under certain | ||
| 418 | * circumstances. To get around this problem, there is at least one | ||
| 419 | * example that utilizes the USB_QUIRK_RESET_RESUME quirk in order to | ||
| 420 | * recieve a reset_resume request rather than the normal resume. Since | ||
| 421 | * the implementation of reset_resume is equal to mode switch plus | ||
| 422 | * open, it seems easier to always do the switch while opening the | ||
| 423 | * device. | ||
| 424 | */ | ||
| 407 | static int atp_open(struct input_dev *input) | 425 | static int atp_open(struct input_dev *input) |
| 408 | { | 426 | { |
| 409 | struct atp *dev = input_get_drvdata(input); | 427 | struct atp *dev = input_get_drvdata(input); |
| 410 | 428 | ||
| 411 | if (!dev->open) { | 429 | if (!dev->open) { |
| 412 | if (atp_wellspring_mode(dev)) | 430 | if (atp_wellspring_mode(dev)) { |
| 413 | printk(KERN_INFO "bcm5974: mode switch failed\n"); | 431 | dprintk(1, "bcm5974: mode switch failed\n"); |
| 414 | 432 | goto error; | |
| 433 | } | ||
| 415 | if (usb_submit_urb(dev->bt_urb, GFP_KERNEL)) | 434 | if (usb_submit_urb(dev->bt_urb, GFP_KERNEL)) |
| 416 | goto error; | 435 | goto error; |
| 417 | if (usb_submit_urb(dev->tp_urb, GFP_KERNEL)) | 436 | if (usb_submit_urb(dev->tp_urb, GFP_KERNEL)) |
| @@ -609,6 +628,7 @@ static struct usb_driver atp_driver = { | |||
| 609 | .disconnect = atp_disconnect, | 628 | .disconnect = atp_disconnect, |
| 610 | .suspend = atp_suspend, | 629 | .suspend = atp_suspend, |
| 611 | .resume = atp_resume, | 630 | .resume = atp_resume, |
| 631 | .reset_resume = atp_resume, | ||
| 612 | .id_table = atp_table, | 632 | .id_table = atp_table, |
| 613 | }; | 633 | }; |
| 614 | 634 | ||
