From patchwork Sat Mar 4 11:24:24 2017 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: 9603867 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 280C760453 for ; Sat, 4 Mar 2017 11:32:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B93628584 for ; Sat, 4 Mar 2017 11:32:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0CF8E28589; Sat, 4 Mar 2017 11:32:38 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 A0CBD28584 for ; Sat, 4 Mar 2017 11:32:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752042AbdCDLcf (ORCPT ); Sat, 4 Mar 2017 06:32:35 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:33784 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752012AbdCDLce (ORCPT ); Sat, 4 Mar 2017 06:32:34 -0500 Received: by mail-wr0-f193.google.com with SMTP id g10so16075564wrg.0; Sat, 04 Mar 2017 03:32:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NvEg8qR+38QMW0U9QITlEVoUEfSNwNUtiJgvwPrSNGE=; b=LsYdyV7XrvCDvg7/+lUy/Ahm6cqbAKSsJnK/97D4qZuNA6QmALH/WAlwUu14fOf7s0 Yt3Gi+W2PNW21XfKnZDUeFrlhAGi0bb4dRSeSxIELFF/hp97PA64bzX+63puNaO7Xgj1 PYf1ah2D+4R/Mxi1ffBYf/xbbL5iKVa8PTmgVPUq7glak15cnKUgByreKO4OB0fEA3XR x4dT+qlG8erGUN4IOh3FC4l30AWZFxnK4nj26B5Hg+tj5rYx2+bJv8j7X3XiSiplAdp5 KaYRaq+4vFWX/fAtPclnRlM0ew5t9vqVooYswGBEazD7wu4wHAEoIbWWuCnV3K4Tq3Qg 1mQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NvEg8qR+38QMW0U9QITlEVoUEfSNwNUtiJgvwPrSNGE=; b=QHpfr8iL/PLY4DElRE/5i/gYEjqerOs8D/ykey6Fa0udcffbfIj+Lmtm8U4LQU3k19 XNI2Ow5AbLVMXvcEAoFhyoNBRNYQWSoOUSQr3DuBfXoWIQLGOHZr3nqmga/eF/l+Ygsy Ogk6CnRWJaFBj5ED7P9o3NjZWx30fSmluGWthgX+XazQvi60C2Obbrt54UIXBpGQ8U7a Srfh7tFulpoKZX5BcbthOsWlxS28xnmNKsK+Vnl6BvpzPmVbml8yCFRu5cMW36sIvKBs N5LudQpnRAZHs1MCeHCYHeYRGogav3cqvNAMltO8Ql7btdQiH4tgPIQX8EaNCT0RNUxR lKRQ== X-Gm-Message-State: AMke39mQ+cLxk7UKeOF39Acpi5YFtlBnl6RNZqYNBVghbJFFfsajTL86OJIvxDa++BzS4g== X-Received: by 10.223.181.152 with SMTP id c24mr6587093wre.94.1488626683909; Sat, 04 Mar 2017 03:24:43 -0800 (PST) Received: from Pali-Latitude.lan (pali.kolej.mff.cuni.cz. [78.128.193.202]) by smtp.gmail.com with ESMTPSA id t194sm6697346wmd.13.2017.03.04.03.24.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Mar 2017 03:24:43 -0800 (PST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH v2 1/3] Input: alps - move ALPS_PROTO_V4 out of alps_model_data table Date: Sat, 4 Mar 2017 12:24:24 +0100 Message-Id: <1488626666-16577-2-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1488626666-16577-1-git-send-email-pali.rohar@gmail.com> References: <1488626666-16577-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-Virus-Scanned: ClamAV using ClamSMTP Like for other protocols create alps_v4_protocol_data and use it in alps_identify() function. Signed-off-by: Pali Rohár --- drivers/input/mouse/alps.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 72b28eb..f36de82 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -138,7 +138,6 @@ { { 0x73, 0x02, 0x50 }, 0x00, { ALPS_PROTO_V2, 0xcf, 0xcf, ALPS_FOUR_BUTTONS } }, /* Dell Vostro 1400 */ { { 0x52, 0x01, 0x14 }, 0x00, { ALPS_PROTO_V2, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED } }, /* Toshiba Tecra A11-11L */ - { { 0x73, 0x02, 0x64 }, 0x8a, { ALPS_PROTO_V4, 0x8f, 0x8f, 0 } }, }; static const struct alps_protocol_info alps_v3_protocol_data = { @@ -149,6 +148,10 @@ ALPS_PROTO_V3_RUSHMORE, 0x8f, 0x8f, ALPS_DUALPOINT }; +static const struct alps_protocol_info alps_v4_protocol_data = { + ALPS_PROTO_V4, 0x8f, 0x8f, 0 +}; + static const struct alps_protocol_info alps_v5_protocol_data = { ALPS_PROTO_V5, 0xc8, 0xd8, 0 }; @@ -2815,7 +2818,10 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv) protocol = alps_match_table(e7, ec); if (!protocol) { - if (e7[0] == 0x73 && e7[1] == 0x03 && e7[2] == 0x50 && + if (e7[0] == 0x73 && e7[1] == 0x02 && e7[2] == 0x64 && + ec[2] == 0x8a) { + protocol = &alps_v4_protocol_data; + } else if (e7[0] == 0x73 && e7[1] == 0x03 && e7[2] == 0x50 && ec[0] == 0x73 && (ec[1] == 0x01 || ec[1] == 0x02)) { protocol = &alps_v5_protocol_data; } else if (ec[0] == 0x88 &&