From patchwork Fri Apr 23 00:52:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Fritz X-Patchwork-Id: 94563 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 o3N0lAoc013035 for ; Fri, 23 Apr 2010 00:47:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754504Ab0DWArJ (ORCPT ); Thu, 22 Apr 2010 20:47:09 -0400 Received: from mail-bw0-f225.google.com ([209.85.218.225]:52578 "EHLO mail-bw0-f225.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754500Ab0DWArH (ORCPT ); Thu, 22 Apr 2010 20:47:07 -0400 Received: by bwz25 with SMTP id 25so10400577bwz.28 for ; Thu, 22 Apr 2010 17:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=gAQP0UyuPWgUX7iY0b9gRkPrMMKXjbrWFdt8FF+neaw=; b=ITcxf6Mk8mhkmSVRaPJ/fXVLYI7Ee60fuNYumSSfuyygUXK80jzSCKIklwoZAonYDy 9qOZVerKDmSUASomQR3CV1Mfz95o6CPvf+9Pd7ihI17l5J/2F1lXcxtP9enqj3XE4WOU 3MZrvB9ZVgSrJ7mo2sMCv/9PMsrcDRPqZux2I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=KplQ+ZdYhL/cMiSWM5xHfrAOFTnQdYAMS0I81XPJDd6jo398c6FT6Zmlm7dgdqqt75 IP3zWlSpa5if1pPCRAcrvPGQ42/+5tJA+tGaZA/4HMwK6VosevIYn5blXxSBReSctzcK qQWO/VtrhdnzK5LPeb7hbBh+W1taT84snKkcE= Received: by 10.87.66.15 with SMTP id t15mr1341332fgk.37.1271983625469; Thu, 22 Apr 2010 17:47:05 -0700 (PDT) Received: from [127.0.0.1] (e180001018.adsl.alicedsl.de [85.180.1.18]) by mx.google.com with ESMTPS id z10sm87428fka.31.2010.04.22.17.47.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 22 Apr 2010 17:47:04 -0700 (PDT) Subject: [PATCH] reset quirk at reconnect for Synaptics touchpads From: Christoph Fritz To: Dmitry Torokhov Cc: "Peter M. Petrakis" , linux-input@vger.kernel.org, rubini Date: Fri, 23 Apr 2010 02:52:39 +0200 Message-Id: <1271983959.16254.48.camel@lovely> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 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, 23 Apr 2010 00:47:11 +0000 (UTC) diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index d8c0c8d..66ce0ac 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c @@ -116,6 +116,9 @@ struct psmouse_protocol { int (*init)(struct psmouse *); }; +/* to handle some reset quirks */ +static bool synaptics_hardware = false; + /* * psmouse_process_byte() analyzes the PS/2 data stream and reports * relevant events to the input module once full packet has arrived. @@ -597,7 +600,6 @@ static int cortron_detect(struct psmouse *psmouse, bool set_properties) static int psmouse_extensions(struct psmouse *psmouse, unsigned int max_proto, bool set_properties) { - bool synaptics_hardware = false; /* * We always check for lifebook because it does not disturb mouse @@ -1401,10 +1403,14 @@ static int psmouse_reconnect(struct serio *serio) if (psmouse->reconnect) { if (psmouse->reconnect(psmouse)) goto out; - } else if (psmouse_probe(psmouse) < 0 || + } else { + if (synaptics_hardware) /* is using plain PS/2 */ + psmouse_reset(psmouse); + if (psmouse_probe(psmouse) < 0 || psmouse->type != psmouse_extensions(psmouse, psmouse_max_proto, false)) { - goto out; + goto out; + } } /* ok, the device type (and capabilities) match the old one,