From patchwork Wed Nov 15 06:34:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Ma X-Patchwork-Id: 10058867 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 033E5601D3 for ; Wed, 15 Nov 2017 06:34:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9CE529D6D for ; Wed, 15 Nov 2017 06:34:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE5EF29DCA; Wed, 15 Nov 2017 06:34:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 92BE129D6D for ; Wed, 15 Nov 2017 06:34:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751380AbdKOGeR (ORCPT ); Wed, 15 Nov 2017 01:34:17 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:45832 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751353AbdKOGeQ (ORCPT ); Wed, 15 Nov 2017 01:34:16 -0500 Received: from [123.118.214.23] (helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1eErH2-00043B-UJ; Wed, 15 Nov 2017 06:34:14 +0000 From: Aaron Ma To: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com, masaki.ota@jp.alps.com, pali.rohar@gmail.com Subject: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices Date: Wed, 15 Nov 2017 14:34:04 +0800 Message-Id: <20171115063404.10066-1-aaron.ma@canonical.com> X-Mailer: git-send-email 2.13.6 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is a regression of commit 4a646580f793 ("Input: ALPS - fix two-finger scroll breakage"), ALPS device fails with log: psmouse serio1: alps: Rejected trackstick packet from non DualPoint device ALPS device with id "74 03 28" report OTP[0] data 0xCE after commit 4a646580f793, after restore the OTP reading order, it becomes to 0x10 as before and reports the right flag. Fixes: 4a646580f793 ("Input: ALPS - fix two-finger scroll breakage") Cc: Signed-off-by: Aaron Ma --- drivers/input/mouse/alps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 579b899add26..c59b8f7ca2fc 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -2562,8 +2562,8 @@ static int alps_set_defaults_ss4_v2(struct psmouse *psmouse, memset(otp, 0, sizeof(otp)); - if (alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]) || - alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0])) + if (alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]) || + alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0])) return -1; alps_update_device_area_ss4_v2(otp, priv);