From patchwork Mon Jan 5 22:28:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriele Mazzotta X-Patchwork-Id: 5570731 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 470669F4DC for ; Mon, 5 Jan 2015 22:30:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 69802202EB for ; Mon, 5 Jan 2015 22:30:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 97CDA20306 for ; Mon, 5 Jan 2015 22:30:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754625AbbAEW25 (ORCPT ); Mon, 5 Jan 2015 17:28:57 -0500 Received: from mail-wg0-f42.google.com ([74.125.82.42]:32863 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754605AbbAEW24 (ORCPT ); Mon, 5 Jan 2015 17:28:56 -0500 Received: by mail-wg0-f42.google.com with SMTP id k14so28373888wgh.1; Mon, 05 Jan 2015 14:28:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tHhh2oDpROZmaP1lxfRnGeoeejLfHNQ0U7igVoI5ce8=; b=WGvHd2VZrDdi8aeJlFQsmWW3sCMtajJrJQVKHAJlGSC/7mUsr3h4HkcgcGnBLEDqCP o4h7bD4jzN2OBP+FmtqsJCleXaCNJxqrFon7lDOyDNUT1FUYnt2zciU0cdmfoBSA05sX h3o/qPXW3OgeHuAhPgj/xdrZPII/R+/KPLy3tnbBNdcVE6hxhgYYFXckXSNrnoa0cHbl skA3/neUZnOXIDOIDgGIlw+Y/nT/kt7OGxsK2jhl1fcBSvc5k0Vt8C3TvQ+9ajFHJH1I p6nmgANl/nhkP53OoRuzLIZk1mklVZJonnTJ3PZedqRz3eejahVIqCSWHiDbfWSi6uU2 Chqg== X-Received: by 10.180.205.177 with SMTP id lh17mr29677302wic.75.1420496934655; Mon, 05 Jan 2015 14:28:54 -0800 (PST) Received: from xps13.homenet (2-235-140-64.ip228.fastwebnet.it. [2.235.140.64]) by mx.google.com with ESMTPSA id h13sm11580679wiw.4.2015.01.05.14.28.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Jan 2015 14:28:54 -0800 (PST) From: Gabriele Mazzotta To: linux-input@vger.kernel.org Cc: dmitry.torokhov@gmail.com, rydberg@euromail.se, linux-kernel@vger.kernel.org, silverhammermba@gmail.com, peter.hutterer@who-t.net, hdegoede@redhat.com, benjamin.tissoires@gmail.com, Gabriele Mazzotta Subject: [PATCH v2 4/4] input: synaptics - make semi-mt touchpads report widths Date: Mon, 5 Jan 2015 23:28:35 +0100 Message-Id: <1420496915-31560-5-git-send-email-gabriele.mzt@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1420496915-31560-1-git-send-email-gabriele.mzt@gmail.com> References: <1420496915-31560-1-git-send-email-gabriele.mzt@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Despite claiming to report finger widths, semi-mt touchpads were not doing it. Make them report widths using ABS_MT_TOUCH_MAJOR instead of ABS_TOOL_WIDTH. Link: https://bugzilla.kernel.org/show_bug.cgi?id=77161 Signed-off-by: Gabriele Mazzotta --- drivers/input/mouse/synaptics.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 5008e8c..7b95a0b 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -819,6 +819,7 @@ static void synaptics_report_mt_data(struct psmouse *psmouse, input_report_abs(dev, ABS_MT_POSITION_X, pos[i].x); input_report_abs(dev, ABS_MT_POSITION_Y, pos[i].y); input_report_abs(dev, ABS_MT_PRESSURE, hw[i]->z); + input_report_abs(dev, ABS_MT_TOUCH_MAJOR, hw[i]->w); } input_mt_drop_unused(dev); @@ -954,8 +955,14 @@ static void synaptics_process_packet(struct psmouse *psmouse) } input_report_abs(dev, ABS_PRESSURE, hw.z); - if (SYN_CAP_PALMDETECT(priv->capabilities)) - input_report_abs(dev, ABS_TOOL_WIDTH, finger_width); + if (SYN_CAP_PALMDETECT(priv->capabilities)) { + if (SYN_CAP_IMAGE_SENSOR(priv->ext_cap_0c) || + cr48_profile_sensor) + input_set_abs_params(dev, + ABS_MT_TOUCH_MAJOR, 4, 15, 0, 0); + else + input_set_abs_params(dev, ABS_TOOL_WIDTH, 0, 15, 0, 0); + } input_report_key(dev, BTN_TOOL_FINGER, num_fingers == 1); if (SYN_CAP_MULTIFINGER(priv->capabilities)) {