usbtouchscreen: Implement basic suspend/resume
Subsystems (2)
PATCH 1/3 usbtouchscreen: Implement basic suspend/resume
Quoted 1 line
From
0f28efab0c7c48dc02f728f57d4a89a203bac986Mon Sep 17 00:00:00 2001
From: Oliver Neukum <[email protected]>
Date: Thu, 24 Jun 2010 08:20:34 +0200
Subject: [PATCH 1/3] usbtouchscreen: Implement basic suspend/resume
This implements basic support for suspend & resume
Signed-off-by Oliver Neukum <[email protected]>
--- drivers/input/touchscreen/usbtouchscreen.c | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-)
drivers/input/touchscreen/usbtouchscreen.c +23 -0
@@ -1291,6 +1291,27 @@ static void usbtouch_close(struct input_dev *input)usb_kill_urb (usbtouch->irq); } +static int usbtouch_suspend +(struct usb_interface *intf,pm_message_t message) +{ +struct usbtouch_usb *usbtouch =usb_get_intfdata (intf); + +usb_kill_urb (usbtouch->irq); +return 0 ; +} + +static int usbtouch_resume (struct usb_interface *intf) +{ +struct usbtouch_usb *usbtouch =usb_get_intfdata (intf); +struct input_dev *input = usbtouch->input; +int result =0 ; + +mutex_lock (&input->mutex); +if (input->users || usbtouch->type->irq_always) + result =usb_submit_urb (usbtouch->irq,GFP_NOIO ); +mutex_unlock (&input->mutex); +return result; +}static void usbtouch_free_buffers (struct usb_device *udev,struct usbtouch_usb *usbtouch)
@@ -1481,6 +1502,8 @@ static struct usb_driver usbtouch_driver = { .name = "usbtouchscreen", .probe = usbtouch_probe, .disconnect = usbtouch_disconnect, + .suspend = usbtouch_suspend, + .resume = usbtouch_resume, .id_table = usbtouch_devices, };
Signature · 6 lines
1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html