summaryrefslogtreecommitdiff
path: root/bcm5974.c
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2008-10-08 23:27:18 +0200
committerHenrik Rydberg <rydberg@euromail.se>2008-10-08 23:27:18 +0200
commitfdf8de5f419e66a793e64896c53f0ccff0a19efb (patch)
treee9f503d1294bcba2e93622db4132e03361990377 /bcm5974.c
parent5bf3dece8af80656f0ab23421c720451e4157ad2 (diff)
bcm5974 (0.57) unstable; urgency=low
* Keep reset_resume around * Submitted to kernel.org -- Henrik Rydberg <rydberg@euromail.se> Sat, 19 Jul 2008 01:42:52 +0200
Diffstat (limited to 'bcm5974.c')
-rw-r--r--bcm5974.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/bcm5974.c b/bcm5974.c
index 67cbab3..1e1cf04 100644
--- a/bcm5974.c
+++ b/bcm5974.c
@@ -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 */
407static int atp_open(struct input_dev *input) 425static 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