From patchwork Fri May 3 20:28:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QsWCYcW8ZWogU3pjenlnaWXFgg==?= X-Patchwork-Id: 10929175 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C7AA5933 for ; Fri, 3 May 2019 20:30:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4F8F2874C for ; Fri, 3 May 2019 20:30:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B33F8287CF; Fri, 3 May 2019 20:30:29 +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.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 026C0287A9 for ; Fri, 3 May 2019 20:30:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727015AbfECUa1 (ORCPT ); Fri, 3 May 2019 16:30:27 -0400 Received: from mx3.wp.pl ([212.77.101.9]:5928 "EHLO mx3.wp.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726932AbfECUa0 (ORCPT ); Fri, 3 May 2019 16:30:26 -0400 Received: (wp-smtpd smtp.wp.pl 29685 invoked from network); 3 May 2019 22:30:23 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1556915423; bh=NIQ+j+7oa4YIxrpJk39a3s2NoeAcMQONM4fdfhdM/t4=; h=From:To:Cc:Subject; b=W/esS6+4CyaPvWJZlF7kXW0TS7TQC4JYTvMs0sq04B7AuCSKa/w7KfxWV60UV+vQO 5e9N6g3CWbyy7HRoAebg4jsmpect4ETHn9KI/0eQsq5UJ4alS+r1ZQurOWH6i05jEu 5TNAnotN+aihDc7BdDmHi9uM0QfdJbI6Pa/7m/Wk= Received: from pc-201-108-240-185-static.strong-pc.com (HELO localhost.localdomain) (spaz16@wp.pl@[185.240.108.201]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 3 May 2019 22:30:23 +0200 From: =?utf-8?b?QsWCYcW8ZWogU3pjenlnaWXFgg==?= Cc: igorkuo@gmail.com, peter.hutterer@who-t.net, =?utf-8?b?QsWCYcW8ZWogU3pj?= =?utf-8?b?enlnaWXFgg==?= , Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] HID: fix A4Tech horizontal scrolling Date: Fri, 3 May 2019 22:28:36 +0200 Message-Id: <20190503202836.12127-1-spaz16@wp.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 X-WP-MailID: fa2c728b9c3f7b3eb3c544a4fc1507b9 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 000000B [cfMU] To: unlisted-recipients:; (no To-header on input) 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 Since recent high resolution scrolling changes the A4Tech driver must check for the "REL_WHEEL_HI_RES" usage code. Link: https://bugzilla.kernel.org/show_bug.cgi?id=203369 Fixes: 2dc702c991e3774af9d7ce410eef410ca9e2357e ("HID: input: use the Resolution Multiplier for high-resolution scrolling") Signed-off-by: Błażej Szczygieł --- Changes in v2: - changed commit message drivers/hid/hid-a4tech.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hid/hid-a4tech.c b/drivers/hid/hid-a4tech.c index 9428ea7cdf8a..fafb9fa558e7 100644 --- a/drivers/hid/hid-a4tech.c +++ b/drivers/hid/hid-a4tech.c @@ -38,7 +38,7 @@ static int a4_input_mapped(struct hid_device *hdev, struct hid_input *hi, { struct a4tech_sc *a4 = hid_get_drvdata(hdev); - if (usage->type == EV_REL && usage->code == REL_WHEEL) + if (usage->type == EV_REL && usage->code == REL_WHEEL_HI_RES) set_bit(REL_HWHEEL, *bit); if ((a4->quirks & A4_2WHEEL_MOUSE_HACK_7) && usage->hid == 0x00090007) @@ -60,7 +60,7 @@ static int a4_event(struct hid_device *hdev, struct hid_field *field, input = field->hidinput->input; if (a4->quirks & A4_2WHEEL_MOUSE_HACK_B8) { - if (usage->type == EV_REL && usage->code == REL_WHEEL) { + if (usage->type == EV_REL && usage->code == REL_WHEEL_HI_RES) { a4->delayed_value = value; return 1; } @@ -77,7 +77,7 @@ static int a4_event(struct hid_device *hdev, struct hid_field *field, return 1; } - if (usage->code == REL_WHEEL && a4->hw_wheel) { + if (usage->code == REL_WHEEL_HI_RES && a4->hw_wheel) { input_event(input, usage->type, REL_HWHEEL, value); return 1; }