From patchwork Fri Mar 12 14:42:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Neukum X-Patchwork-Id: 85288 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2CEgHuF013377 for ; Fri, 12 Mar 2010 14:42:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757865Ab0CLOmR (ORCPT ); Fri, 12 Mar 2010 09:42:17 -0500 Received: from smtp-out003.kontent.com ([81.88.40.217]:33394 "EHLO smtp-out003.kontent.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756373Ab0CLOmQ convert rfc822-to-8bit (ORCPT ); Fri, 12 Mar 2010 09:42:16 -0500 Received: from vanamonde.localnet (p549A1C46.dip0.t-ipconnect.de [84.154.28.70]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: neukum_org@smtp-out003.kontent.com) by smtp-out003.kontent.com (Postfix) with ESMTPSA id B43934000270; Fri, 12 Mar 2010 15:42:15 +0100 (CET) To: Daniel Ritz Subject: [RFC/RFT 2/5] USB: usbtouch: Implement reset_resume() Cc: linux-input@vger.kernel.org, USB list From: Oliver Neukum Date: Fri, 12 Mar 2010 15:42:11 +0100 MIME-Version: 1.0 Message-Id: <201003121542.11340.oliver@neukum.org> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 12 Mar 2010 14:42:18 +0000 (UTC) diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 6db0a03..8836761 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -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, };