From patchwork Sat May 28 12:01:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gamari X-Patchwork-Id: 9139397 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 E843E60757 for ; Sat, 28 May 2016 12:01:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9B0F27B33 for ; Sat, 28 May 2016 12:01:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE9A528066; Sat, 28 May 2016 12:01:26 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 7744F27B33 for ; Sat, 28 May 2016 12:01:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752753AbcE1MBX (ORCPT ); Sat, 28 May 2016 08:01:23 -0400 Received: from mail.smart-cactus.org ([54.187.36.80]:56308 "EHLO mail.smart-cactus.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752720AbcE1MBW (ORCPT ); Sat, 28 May 2016 08:01:22 -0400 Received: from localhost.localdomain (HSI-KBW-46-237-229-123.hsi.kabel-badenwuerttemberg.de [46.237.229.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: ben@smart-cactus.org) by mail.smart-cactus.org (Postfix) with ESMTPSA id 68266407A9; Sat, 28 May 2016 11:44:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.smart-cactus.org; s=mail; t=1464435895; bh=4HE3+0pR1+CyRFir9gFsI9mVcSLAxme/meVU/Yn0078=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sqaXtniIlqQgpywl/QePqkbTLzChXbdFc+lybOAzN1EtadX6blHwA4SKb0PMLA1uR /n5rHooglWrRiECvBKGw6yPrMAUgm17wVX/adNv8fUASY4kMix1CQuLm7mFOCxLDcA NbM8sxIdCeekAP3dJdGQRduG7wONVtqN6VAlzwT0= From: Ben Gamari To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , linux-input@vger.kernel.org Cc: Hans de Goede , Allen Hung , Masaki Ota , Ben Morgan , Ben Gamari Subject: [PATCH 4/4] input/alps: Set DualPoint flag for 74 03 28 devices Date: Sat, 28 May 2016 14:01:02 +0200 Message-Id: <1464436862-2649-5-git-send-email-ben@smart-cactus.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1464436862-2649-1-git-send-email-ben@smart-cactus.org> References: <1464436862-2649-1-git-send-email-ben@smart-cactus.org> 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 Here we introduce logic in alps_identify to set the ALPS_DUALPOINT flag for touchpad hardware responding to E7 report with 73 03 28, as is found in the Dell Latitude E7470. --- drivers/input/mouse/alps.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 25d2cad..431bc26 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -2776,6 +2776,7 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv) const struct alps_protocol_info *protocol; unsigned char e6[4], e7[4], ec[4]; int error; + int flags = 0; /* * First try "E6 report". @@ -2817,6 +2818,10 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv) } else if (e7[0] == 0x73 && e7[1] == 0x03 && e7[2] == 0x14 && ec[1] == 0x02) { protocol = &alps_v8_protocol_data; + } else if (e7[0] == 0x73 && e7[1] == 0x03 && + e7[2] == 0x28 && ec[1] == 0x01) { + protocol = &alps_v8_protocol_data; + flags |= ALPS_DUALPOINT | ALPS_DUALPOINT_WITH_PRESSURE; } else { psmouse_dbg(psmouse, "Likely not an ALPS touchpad: E7=%3ph, EC=%3ph\n", e7, ec); @@ -2830,6 +2835,7 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv) error = alps_set_protocol(psmouse, priv, protocol); if (error) return error; + priv->flags |= flags; } return 0;