From patchwork Mon Jan 5 22:28:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriele Mazzotta X-Patchwork-Id: 5570751 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 30EC89F1C5 for ; Mon, 5 Jan 2015 22:36:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 54BE020306 for ; Mon, 5 Jan 2015 22:36:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8695F202F8 for ; Mon, 5 Jan 2015 22:36:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754461AbbAEWg1 (ORCPT ); Mon, 5 Jan 2015 17:36:27 -0500 Received: from mail-wg0-f52.google.com ([74.125.82.52]:53257 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754087AbbAEWg1 (ORCPT ); Mon, 5 Jan 2015 17:36:27 -0500 Received: by mail-wg0-f52.google.com with SMTP id x12so28226030wgg.25 for ; Mon, 05 Jan 2015 14:36:25 -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=aJitJ4Z5cy1i5JvgoX5OU4MOiR2Lt5Sq64nvD1omKHQ=; b=H89Yu9fEahJv0hvVytGfGzzRkFJvHCAmpk3OkpFYbkuT2C17YeplCACelIdRbZagi5 wd22L9tAKMshpM6VJ1TfixsNCF4RVEqqCH46RsbqlkwdLcBq+MV3CwqYFNCFJXkGCFiR dca98hvFfqwDipW3beWIFBpe2PjyisFBYr/oaBD5S8S6dWVftggs/4w57fqUFJj01Lam yPf4+Dd/shU14rub0/EYniCZ7dSg4RpNzX/ktMLaDV4HP8tLcHQETdU7i1S6lrCkdJ2G LLPWrdDRiJMEy6V3p/5d8/FzeUD8GcDiCB9ZwdrjQB3+FqK6n9jPoXFYVsUlDKMltNeO w4kA== X-Received: by 10.194.190.10 with SMTP id gm10mr76396229wjc.91.1420496929198; Mon, 05 Jan 2015 14:28:49 -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.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Jan 2015 14:28:48 -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 1/4] input: synaptics - fix pressure values calculation on image sensors Date: Mon, 5 Jan 2015 23:28:32 +0100 Message-Id: <1420496915-31560-2-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 The pressure values retrieved from secondary packets was incorrectly shifted, making them lower than what they actually were. Since this only happened with secondary packets, the values reported when only one finger was present on the touchpad were correct. Signed-off-by: Gabriele Mazzotta --- drivers/input/mouse/synaptics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index f89de89..4d22ebd 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -588,7 +588,7 @@ static void synaptics_parse_agm(const unsigned char buf[], agm->w = hw->w; agm->x = (((buf[4] & 0x0f) << 8) | buf[1]) << 1; agm->y = (((buf[4] & 0xf0) << 4) | buf[2]) << 1; - agm->z = ((buf[3] & 0x30) | (buf[5] & 0x0f)) << 1; + agm->z = ((buf[3] & 0x30) | (buf[5] & 0x0f)) << 2; break; case 2: