From patchwork Tue Jun 21 09:19:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gamari X-Patchwork-Id: 9190017 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 9B86F60756 for ; Tue, 21 Jun 2016 09:20:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A828223A1 for ; Tue, 21 Jun 2016 09:20:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F39F265B9; Tue, 21 Jun 2016 09:20:36 +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 27DF427FA3 for ; Tue, 21 Jun 2016 09:20:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751346AbcFUJUf (ORCPT ); Tue, 21 Jun 2016 05:20:35 -0400 Received: from mail.smart-cactus.org ([54.187.36.80]:56541 "EHLO mail.smart-cactus.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751059AbcFUJUa (ORCPT ); Tue, 21 Jun 2016 05:20:30 -0400 Received: from ben-laptop.uni-mannheim.de (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 47521407B6; Tue, 21 Jun 2016 09:02:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.smart-cactus.org; s=mail; t=1466499776; bh=fRFDFHlsDKSgQWrPH03By/a+VmhjxpXDieDPr55LgQs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fc2Tud/d3XeOufgh1wV0pqG6qOrpnvlF5okIGuQAwSUb26geeq09ocEO8RgXO1W+M h7JIMRWbh9X0q4RRP9+n0dyh2ggvNmbEeoFJf3JeXFZJwvej4YC+hY4OHgz0FroyK+ BaQsa6Bku8c6RWW0kd4Z6j2NoQ20qfiaqNVnXGg8= From: Ben Gamari To: Ben Gamari , linux-input@vger.kernel.org, Hans de Goede , Allen Hung , Masaki Ota , Ben Morgan Subject: [PATCH 4/5] input/alps: Set DualPoint flag for 74 03 28 devices Date: Tue, 21 Jun 2016 11:19:32 +0200 Message-Id: <1466500773-3470-5-git-send-email-ben@smart-cactus.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1466500773-3470-1-git-send-email-ben@smart-cactus.org> References: <1466500773-3470-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..308f289 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -2745,6 +2745,9 @@ static int alps_set_protocol(struct psmouse *psmouse, if (alps_set_defaults_ss4_v2(psmouse, priv)) return -EIO; + if (priv->fw_ver[1] == 0x1) + priv->flags |= ALPS_DUALPOINT | ALPS_DUALPOINT_WITH_PRESSURE; + break; } @@ -2817,6 +2820,9 @@ 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; } else { psmouse_dbg(psmouse, "Likely not an ALPS touchpad: E7=%3ph, EC=%3ph\n", e7, ec);