From patchwork Fri Oct 3 09:43:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 5021721 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AF3EF9F32B for ; Fri, 3 Oct 2014 09:44:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D7631201F5 for ; Fri, 3 Oct 2014 09:44:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EA98F201F2 for ; Fri, 3 Oct 2014 09:44:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752022AbaJCJnn (ORCPT ); Fri, 3 Oct 2014 05:43:43 -0400 Received: from mail-wg0-f51.google.com ([74.125.82.51]:38286 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751962AbaJCJnl (ORCPT ); Fri, 3 Oct 2014 05:43:41 -0400 Received: by mail-wg0-f51.google.com with SMTP id b13so1012763wgh.22 for ; Fri, 03 Oct 2014 02:43:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=80VKy0Y8NWte7KcwgDwthLph5bOjrX72LSmiNUkZfb0=; b=jUJMPipe7AU3gqMfLAqJ8Hv0Uoq3h9WqbCoJqxrRLircmf7VDkFZGy/Br4WkFazUDd uAVVdQXX5KRIRdkw7grj9avDnZmc0NxjvVewe446FZjyHjYCx58vMwzUisdftDGWGbJ9 syffnvDPNTZxFkZaRDXZ5SRiHDXl8C3lTZqIa2YvmTqn8vuT89zwZ6TrThETZs4g0qps fBAKQzIqK/1NvzmyVVabhQpKl2tRYpPnAWr768MZSu9GPU+2EKyjmX4B3qbYzPtR4Ok3 v4gTEXfkhfwbGTNarQzRhBO1JeforykzJZWQS9N3m3FfAJIfRibJODIVozVe6yg25fwX UXKQ== X-Received: by 10.180.210.239 with SMTP id mx15mr11209069wic.29.1412329419399; Fri, 03 Oct 2014 02:43:39 -0700 (PDT) Received: from Pali-Latitude.kolej.mff.cuni.cz (pali.kolej.mff.cuni.cz. [78.128.193.202]) by mx.google.com with ESMTPSA id k2sm7389416wjy.34.2014.10.03.02.43.37 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 03 Oct 2014 02:43:38 -0700 (PDT) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Dmitry Torokhov , Hans de Goede , Yunkang Tang , Tommy Will Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH 1/3] input: alps: Reset mouse before identifying it Date: Fri, 3 Oct 2014 11:43:10 +0200 Message-Id: <1412329392-5580-2-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1412329392-5580-1-git-send-email-pali.rohar@gmail.com> References: <1412329392-5580-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On some systems after starting computer function alps_identify() does not detect dual ALPS touchpad+trackstick device correctly and detect only touchpad. Resetting ALPS device before identifiying it fixing this problem and both parts touchpad and trackstick are detected. Signed-off-by: Pali Rohár Tested-by: Pali Rohár Acked-by: Hans de Goede --- drivers/input/mouse/alps.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 35a49bf..1bd5aa1 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -2403,6 +2403,8 @@ int alps_detect(struct psmouse *psmouse, bool set_properties) { struct alps_data dummy; + psmouse_reset(psmouse); + if (alps_identify(psmouse, &dummy) < 0) return -1;