diff options
-rw-r--r-- | drivers/hid/hid-multitouch.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 4a8048d3e9dd..e170112e2b84 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c | |||
@@ -765,6 +765,32 @@ static int mt_reset_resume(struct hid_device *hdev) | |||
765 | mt_set_input_mode(hdev); | 765 | mt_set_input_mode(hdev); |
766 | return 0; | 766 | return 0; |
767 | } | 767 | } |
768 | |||
769 | static int mt_resume(struct hid_device *hdev) | ||
770 | { | ||
771 | struct usb_interface *intf; | ||
772 | struct usb_host_interface *interface; | ||
773 | struct usb_device *dev; | ||
774 | |||
775 | if (hdev->bus != BUS_USB) | ||
776 | return 0; | ||
777 | |||
778 | intf = to_usb_interface(hdev->dev.parent); | ||
779 | interface = intf->cur_altsetting; | ||
780 | dev = hid_to_usb_dev(hdev); | ||
781 | |||
782 | /* Some Elan legacy devices require SET_IDLE to be set on resume. | ||
783 | * It should be safe to send it to other devices too. | ||
784 | * Tested on 3M, Stantum, Cypress, Zytronic, eGalax, and Elan panels. */ | ||
785 | |||
786 | usb_control_msg(dev, usb_sndctrlpipe(dev, 0), | ||
787 | HID_REQ_SET_IDLE, | ||
788 | USB_TYPE_CLASS | USB_RECIP_INTERFACE, | ||
789 | 0, interface->desc.bInterfaceNumber, | ||
790 | NULL, 0, USB_CTRL_SET_TIMEOUT); | ||
791 | |||
792 | return 0; | ||
793 | } | ||
768 | #endif | 794 | #endif |
769 | 795 | ||
770 | static void mt_remove(struct hid_device *hdev) | 796 | static void mt_remove(struct hid_device *hdev) |
@@ -1102,6 +1128,7 @@ static struct hid_driver mt_driver = { | |||
1102 | .event = mt_event, | 1128 | .event = mt_event, |
1103 | #ifdef CONFIG_PM | 1129 | #ifdef CONFIG_PM |
1104 | .reset_resume = mt_reset_resume, | 1130 | .reset_resume = mt_reset_resume, |
1131 | .resume = mt_resume, | ||
1105 | #endif | 1132 | #endif |
1106 | }; | 1133 | }; |
1107 | 1134 | ||