Skip to contentSkip to conversation

USB: usbtouch: Implement reset_resume()

PATCH In review Oliver Neukum 1 participant 1 message Mar 12, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/5 USB: usbtouch: Implement reset_resume()

Quoted 1 line

From 6771256d8fe7540e747fe45a4b3529c5466c09b7 Mon Sep 17 00:00:00 2001

From: Oliver Neukum <[email protected]>
Date: Thu, 11 Mar 2010 15:00:40 +0100
Subject: [PATCH 2/5] USB: usbtouch: Implement reset_resume()

In reset_resume() redo model specific init and then do a resume

---
 drivers/input/touchscreen/usbtouchscreen.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
drivers/input/touchscreen/usbtouchscreen.c +21 -0
index 6db0a03..8836761 100644
@@ -1310,6 +1310,26 @@ static int usbtouch_resume(struct usb_interface *intf)
 	return rv;
 }
 
+static int usbtouch_reset_resume(struct usb_interface *intf)
+{
+	struct usbtouch_usb *usbtouch = usb_get_intfdata(intf);
+	int rv;
+
+	/* device specific init */
+	if (usbtouch->type->init) {
+		rv = usbtouch->type->init(usbtouch);
+		if (rv) {
+			dbg("%s - type->init() failed, err: %d", __func__, rv);
+			goto err_out;
+		}
+	}
+	
+	rv = usbtouch_resume(intf);
+
+err_out:
+	return rv;
+}
+
 static void usbtouch_free_buffers(struct usb_device *udev,
 				  struct usbtouch_usb *usbtouch)
 {
@@ -1501,6 +1521,7 @@ static struct usb_driver usbtouch_driver = {
 	.disconnect	= usbtouch_disconnect,
 	.suspend	= usbtouch_suspend,
 	.resume		= usbtouch_resume,
+	.reset_resume	= usbtouch_reset_resume,
 	.id_table	= usbtouch_devices,
 };
 
Signature · 6 lines
1.6.4.2

--
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