From patchwork Sat Mar 4 11:24:25 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: 9603871 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 D5D6A60453 for ; Sat, 4 Mar 2017 11:32:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCC1C28589 for ; Sat, 4 Mar 2017 11:32:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C13942858D; Sat, 4 Mar 2017 11:32:42 +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 6D4D928584 for ; Sat, 4 Mar 2017 11:32:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752012AbdCDLci (ORCPT ); Sat, 4 Mar 2017 06:32:38 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36680 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752019AbdCDLcg (ORCPT ); Sat, 4 Mar 2017 06:32:36 -0500 Received: by mail-wm0-f68.google.com with SMTP id v190so6662365wme.3; Sat, 04 Mar 2017 03:32:34 -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=Zl7aHf3TmWvgdnlDYP5a5ImfUiQXhOK+ZoBc6q1Mx/c=; b=sSbr2LvMylwtw3nF+ziDpN9IWRPMOp7hkOWUt3gwdLJTDdzi5AytQ4H8itgUney7vf OrUCxUvGO+ibA7j51QsdeUFxqO8jqAYkw6ZRzhawXlpBkEXuARAEf203jjyrOxTqQ4O3 6Id6b73uEbRcHJaWG/3fJhRNFUVpDj8ZHnr4v4oLX9W96RFeijLqdrZ3r/zztyK9Grhr 8Aij5UGD//mug2TpNuoiKm3EE6LpJOumEpdSW+WIejxjxCNWzNU8fsHuCg4kwhlrjX8H /oVek/FF3g+Qm9ckmfwRCWnhUohHaNYmsVUgKcNrVRy4QPMJzVCt23ZlwKMvo9uvKwt4 f9jw== 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=Zl7aHf3TmWvgdnlDYP5a5ImfUiQXhOK+ZoBc6q1Mx/c=; b=tGM/xYZ51ZK5nf+BfYzOZocnYgQaJknIk2EdSOqiRtMY7x+fgoUfF9IAye/iSOalm/ x1M87qpJR/UizC7sNJwIk5LEiip4n2dIMzMkJiQXg6z+T3LFvZ3oihVNZumBtlW/wQjI wdjGc11jbV45S0m5QXpWiPWL8AyDDBs+vS4pL61r4/AAB937Wj6oDWldbunXJamHpIcD i0qLwzWeX/6g9Kwjp7Pz4OMMrZiKTOE3ndjuCFZ9KOrs0M6pfki7YN4qbD+4Mc5ZeRC6 JYyi25VB5YoBYCd21rH6eMSfOiDWXbeRepmzx5J3VEboHbQb+zkkjSKN6XMtIZ795xnr kdEg== X-Gm-Message-State: AMke39n2IJ3RA5Ato/69ho2PxIpoLfLabuhnG4Ig6ZYlM48l9CpVOcZqWCnIrwbDnCFu0w== X-Received: by 10.28.5.72 with SMTP id 69mr6158769wmf.6.1488626686934; Sat, 04 Mar 2017 03:24:46 -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.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Mar 2017 03:24:46 -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 2/3] Input: alps - warn about unsupported ALPS V9 touchpad Date: Sat, 4 Mar 2017 12:24:25 +0100 Message-Id: <1488626666-16577-3-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 Support for devices with ALPS_PROTO_V9 is not implemented yet but we can detect these alps touchpads and warn users about it. Signed-off-by: Pali Rohár --- drivers/input/mouse/alps.c | 9 +++++++++ drivers/input/mouse/alps.h | 1 + 2 files changed, 10 insertions(+) diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index f36de82..9908f18 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -164,6 +164,10 @@ ALPS_PROTO_V8, 0x18, 0x18, 0 }; +static const struct alps_protocol_info alps_v9_protocol_data = { + ALPS_PROTO_V9, 0xc8, 0xc8, 0 +}; + /* * Some v2 models report the stick buttons in separate bits */ @@ -2838,6 +2842,11 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv) } else if (e7[0] == 0x73 && e7[1] == 0x03 && e7[2] == 0x28 && ec[1] == 0x01) { protocol = &alps_v8_protocol_data; + } else if (e7[0] == 0x73 && e7[1] == 0x03 && e7[2] == 0xc8) { + protocol = &alps_v9_protocol_data; + psmouse_warn(psmouse, + "Unsupported ALPS V9 touchpad: E7=%3ph, EC=%3ph\n", e7, ec); + return -EINVAL; } else { psmouse_dbg(psmouse, "Likely not an ALPS touchpad: E7=%3ph, EC=%3ph\n", e7, ec); diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h index 6d279aa..54f9f44 100644 --- a/drivers/input/mouse/alps.h +++ b/drivers/input/mouse/alps.h @@ -23,6 +23,7 @@ #define ALPS_PROTO_V6 0x600 #define ALPS_PROTO_V7 0x700 /* t3btl t4s */ #define ALPS_PROTO_V8 0x800 /* SS4btl SS4s */ +#define ALPS_PROTO_V9 0x900 /* ss3btl */ #define MAX_TOUCHES 4