From patchwork Sun Mar 22 14:43:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriele Mazzotta X-Patchwork-Id: 6066861 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 41AC39F350 for ; Sun, 22 Mar 2015 14:45:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 746C42026F for ; Sun, 22 Mar 2015 14:45:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A15802026D for ; Sun, 22 Mar 2015 14:45:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751819AbbCVOoi (ORCPT ); Sun, 22 Mar 2015 10:44:38 -0400 Received: from mail-wg0-f45.google.com ([74.125.82.45]:35325 "EHLO mail-wg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751781AbbCVOo3 (ORCPT ); Sun, 22 Mar 2015 10:44:29 -0400 Received: by wgdm6 with SMTP id m6so126773739wgd.2; Sun, 22 Mar 2015 07:44:27 -0700 (PDT) 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=QpPouO9REcb4IrXBjobWuMtN+fOBC1rOKMrfZ7yjo8M=; b=lpk5ogxChSBNJTZWGI7vbqXHo/7xAGIAGP7tyMx6wQ7P20Gd1Zs/2GhUNxyRLlJgm7 f0pODOdhxvGh6fyh6ITazzu/zXPJuq7F2MztrffSqQRcFbpQc3bPyCAnQFlFofKV/0ol MJ7x9PpcEcQWuCtSI2x6re6zA+6mWUSYr+OspG3/IVYMfpr2HrVmx4StSODmEYODCdsj 35wOgZFsYb41hDtYyOA85hG8rGsWryZ3UMjHX+GGxTNHWZkNn7yJBVrDBdlkXN2ex85h u7UQ9sFp5ee/NAJKqWldCn7gKYboHiN26Og+FaEDHAbUE1z9atu+Zhkm+aAKoMCkNPfj s+DA== X-Received: by 10.180.93.165 with SMTP id cv5mr11494547wib.51.1427035467840; Sun, 22 Mar 2015 07:44:27 -0700 (PDT) Received: from xps13.homenet (2-235-140-64.ip228.fastwebnet.it. [2.235.140.64]) by mx.google.com with ESMTPSA id pa4sm15134038wjb.11.2015.03.22.07.44.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 22 Mar 2015 07:44:27 -0700 (PDT) From: Gabriele Mazzotta To: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com, rydberg@bitmath.org, silverhammermba@gmail.com, peter.hutterer@who-t.net, hdegoede@redhat.com, benjamin.tissoires@gmail.com, grafi@grafi.jp, oneukum@suse.de, Gabriele Mazzotta Subject: [PATCH v3 4/5] input: synaptics - make image sensors and cr48 sensors report widths Date: Sun, 22 Mar 2015 15:43:55 +0100 Message-Id: <1427035436-2168-5-git-send-email-gabriele.mzt@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1427035436-2168-1-git-send-email-gabriele.mzt@gmail.com> References: <1427035436-2168-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=unavailable 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 The driver was not reporting widths for image sensors and cr48 sensors despite it was calculating them. Link: https://bugzilla.kernel.org/show_bug.cgi?id=77161 Signed-off-by: Gabriele Mazzotta --- drivers/input/mouse/synaptics.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index ff47084..4e86ba6 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -927,6 +927,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); @@ -1192,8 +1193,9 @@ static void set_input_params(struct psmouse *psmouse, if (SYN_CAP_IMAGE_SENSOR(priv->ext_cap_0c)) { set_abs_position_params(dev, priv, ABS_MT_POSITION_X, ABS_MT_POSITION_Y); - /* Image sensors can report per-contact pressure */ + /* Image sensors can report per-contact pressure and width */ input_set_abs_params(dev, ABS_MT_PRESSURE, 0, 255, 0, 0); + input_set_abs_params(dev, ABS_MT_TOUCH_MAJOR, 4, 15, 0, 0); input_mt_init_slots(dev, 2, INPUT_MT_POINTER | INPUT_MT_TRACK); /* Image sensors can signal 4 and 5 finger clicks */ __set_bit(BTN_TOOL_QUADTAP, dev->keybit); @@ -1202,6 +1204,7 @@ static void set_input_params(struct psmouse *psmouse, set_abs_position_params(dev, priv, ABS_MT_POSITION_X, ABS_MT_POSITION_Y); input_set_abs_params(dev, ABS_MT_PRESSURE, 0, 255, 0, 0); + input_set_abs_params(dev, ABS_MT_TOUCH_MAJOR, 4, 15, 0, 0); /* * Profile sensor in CR-48 tracks contacts reasonably well, * other non-image sensors with AGM use semi-mt.