From patchwork Sun Apr 8 15:53:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 10328355 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 135C36020F for ; Sun, 8 Apr 2018 15:54:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA675287A4 for ; Sun, 8 Apr 2018 15:54:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DEE06288C4; Sun, 8 Apr 2018 15:54:01 +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=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, 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 88BAF287A4 for ; Sun, 8 Apr 2018 15:54:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752369AbeDHPyA (ORCPT ); Sun, 8 Apr 2018 11:54:00 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:44734 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751736AbeDHPx7 (ORCPT ); Sun, 8 Apr 2018 11:53:59 -0400 Received: by mail-wr0-f194.google.com with SMTP id u46so6060853wrc.11; Sun, 08 Apr 2018 08:53:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3xa99x+PXJZAZP7ovg6dfdupxxrLstsZXPOLfN90b5s=; b=LDMc+pQ+84Z3IcMz29YLVQJPbgtlhxoboeRE+Cik2IFHVCGcmedxbG3P5CQ+JlIZHh z3dTy1SBVgNMU2zAqouAiHRIpySULBUi/r3DU4hqHS83B+8DlwApMraox8KVqXmxxBqu 413v325SamJraWWzdVxX4OzdAX7AjFm6PYw8Y4iIP6pIaF2PbOFQpwRpgHJnts1QVf6f 2utFYEndKT/smX8U0fzG5rhRZktG9NyxzZSc/MQe4IWStILXE5UEVWVWjho4C03DEVVf JJRTubiUvnnbAkI9F9iPuUJb2RDfyxyVusWm5f6vt+JKy4X7punhvVuDe6sezGZLKErx lyuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3xa99x+PXJZAZP7ovg6dfdupxxrLstsZXPOLfN90b5s=; b=VsUm+cGqO0vhzjMIY9MRbZHiIv4QLCSuDot3S2Jswi62SY849AfsPtghrsevIIIAUs qXC7JNvD89HjnRYTeHy7QhV0AXr/EYhw48WC4cm9Oq0FRW182EcIx/JcACXoOqcEuBQ+ 4Mnz1CxnHD1HE7ML3Nhq/F/5L3ICk3K5guU/PfYdejZQsAGCVwPb6qp6HiVRmeqafuel dbTD35hS0p5cersSKV+VsasM4y2dlekDfumNMrAJ7AlHJay6KXLfoRtFihWm9h2l8l/7 m9KReiVUVtUhbDTzfzZ8iYIqYAWwfPphiM9tvVVlqkdE8Ee0CPEup9/+1cHHroJaqQa4 0EOA== X-Gm-Message-State: AElRT7EgtH8xVFzo2T1swkOy++I0oQNwspD98fYcsUEB+XgvtgD2KCs2 4WpFRwou8GgqhnOmeyiISOg= X-Google-Smtp-Source: AIpwx4/CXAfsnOQv4VFPEL7rXNV5qrNqeNNmBp/KWXFYKFPrQIQX0FGd5XyxoLPzPFjCIJHJlm/gpQ== X-Received: by 10.223.178.163 with SMTP id g32mr25265008wrd.204.1523202838141; Sun, 08 Apr 2018 08:53:58 -0700 (PDT) Received: from Pali-Latitude.lan (pali.kolej.mff.cuni.cz. [78.128.193.202]) by smtp.gmail.com with ESMTPSA id q127sm17021065wmd.3.2018.04.08.08.53.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Apr 2018 08:53:57 -0700 (PDT) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Dmitry Torokhov , Masaki Ota Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Input: alps - Fix reporting pressure of v3 trackstick Date: Sun, 8 Apr 2018 17:53:21 +0200 Message-Id: <20180408155321.10433-1-pali.rohar@gmail.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 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 According to documentation, all 7 lower bits represents trackpoint pressure. Fixes: 4621c9660459 ("Input: alps - report pressure of v3 and v7 trackstick") Signed-off-by: Pali Rohár --- drivers/input/mouse/alps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 0a9e6a3a2f9f..1e28d9fc5492 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -583,7 +583,7 @@ static void alps_process_trackstick_packet_v3(struct psmouse *psmouse) x = (s8)(((packet[0] & 0x20) << 2) | (packet[1] & 0x7f)); y = (s8)(((packet[0] & 0x10) << 3) | (packet[2] & 0x7f)); - z = packet[4] & 0x7c; + z = packet[4] & 0x7f; /* * The x and y values tend to be quite large, and when used