From patchwork Tue Apr 11 13:29:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 9675301 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 41BCA600CB for ; Tue, 11 Apr 2017 13:30:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3434D2787C for ; Tue, 11 Apr 2017 13:30:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2859828550; Tue, 11 Apr 2017 13:30:18 +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=-6.9 required=2.0 tests=BAYES_00,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 CF6082787C for ; Tue, 11 Apr 2017 13:30:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752794AbdDKNaR (ORCPT ); Tue, 11 Apr 2017 09:30:17 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:59460 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751966AbdDKNaQ (ORCPT ); Tue, 11 Apr 2017 09:30:16 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id CC259A05F5; Tue, 11 Apr 2017 13:30:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osg.samsung.com X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from osg.samsung.com ([127.0.0.1]) by localhost (s-opensource.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YA9h8K_-_wWs; Tue, 11 Apr 2017 13:30:35 +0000 (UTC) Received: from smtp.s-opensource.com (201.47.150.171.dynamic.adsl.gvt.net.br [201.47.150.171]) by osg.samsung.com (Postfix) with ESMTPSA id C9B19A05F4; Tue, 11 Apr 2017 13:30:33 +0000 (UTC) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.87) (envelope-from ) id 1cxvrb-00025b-N1; Tue, 11 Apr 2017 10:29:43 -0300 From: Mauro Carvalho Chehab To: linux-input@vger.kernel.org, Dmitry Torokhov , Benjamin Tissoires , Jiri Kosina Cc: Mauro Carvalho Chehab , Jonathan Corbet , Roderick Colenbrander , Ping Cheng , Hans Verkuil , Kamil Debski , Douglas Anderson , linux-doc@vger.kernel.org Subject: [PATCH v4 2/5] input: add an EV_REL event for high-res vertical wheel Date: Tue, 11 Apr 2017 10:29:39 -0300 Message-Id: <5656f59d7fb0590dd139c5e6b597bd56e823bd94.1491917052.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <34b4f3e6baedde818516ceb1d009f6568b953345.1491917052.git.mchehab@s-opensource.com> References: <34b4f3e6baedde818516ceb1d009f6568b953345.1491917052.git.mchehab@s-opensource.com> In-Reply-To: References: 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 As some devices can produce either low-res or high-res vertical wheel EV_REL events, add a new event to allow userspace to distinguish between them. Signed-off-by: Mauro Carvalho Chehab --- Documentation/input/event-codes.txt | 17 ++++++++++++++--- include/uapi/linux/input-event-codes.h | 1 + 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Documentation/input/event-codes.txt b/Documentation/input/event-codes.txt index 575415f4cef0..50352ab5f6d4 100644 --- a/Documentation/input/event-codes.txt +++ b/Documentation/input/event-codes.txt @@ -156,9 +156,20 @@ instead of EV_REL codes. A few EV_REL codes have special meanings: -* REL_WHEEL, REL_HWHEEL: - - These codes are used for vertical and horizontal scroll wheels, - respectively. +* REL_WHEEL: + + - These codes are used for vertical scroll wheels. + + - REL_WHEEL is for normal wheel operational mode, e. g. low-resolution + (line-based) scroll. + + - REL_HIRES_WHEEL should be used when the wheel has two resolutions and it + is in high-resolution mode, e. g. the same angular movement that would + produce a single REL_WHEEL will produce multiple REL_HIRES_WHEEL events. + +* REL_HWHEEL: + + - This code is used for horizontal scroll wheels. EV_ABS: ---------- diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h index 444956ba832c..da48d4079511 100644 --- a/include/uapi/linux/input-event-codes.h +++ b/include/uapi/linux/input-event-codes.h @@ -710,6 +710,7 @@ #define REL_MISC_4 0x0d #define REL_MISC_5 0x0e #define REL_MISC_6 0x0f +#define REL_HIRES_WHEEL 0x10 #define REL_MAX 0x1f #define REL_CNT (REL_MAX+1)