All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: linux-input@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Jiri Kosina <jkosina@suse.cz>
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Roderick Colenbrander <roderick.colenbrander@sony.com>,
	Ping Cheng <pinglinux@gmail.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Kamil Debski <kamil@wypas.org>,
	Douglas Anderson <dianders@chromium.org>,
	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	[thread overview]
Message-ID: <5656f59d7fb0590dd139c5e6b597bd56e823bd94.1491917052.git.mchehab@s-opensource.com> (raw)
In-Reply-To: <34b4f3e6baedde818516ceb1d009f6568b953345.1491917052.git.mchehab@s-opensource.com>
In-Reply-To: <cover.1491917052.git.mchehab@s-opensource.com>

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 <mchehab@s-opensource.com>
---
 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)
 
-- 
2.9.3


  reply	other threads:[~2017-04-11 13:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11 13:29 [PATCH v4 0/5] add support for high res wheel found on some Logitech devices Mauro Carvalho Chehab
2017-04-11 13:29 ` [PATCH v4 1/5] input: event-codes: reserve some space for REL_MISC events Mauro Carvalho Chehab
2017-04-11 13:29   ` Mauro Carvalho Chehab [this message]
2017-04-11 13:29     ` [PATCH v4 3/5] input: add a EV_SW event for ratchet switch Mauro Carvalho Chehab
2017-04-11 13:29       ` [PATCH v4 4/5] hid-logitech-hidpp: add support for high res wheel Mauro Carvalho Chehab
2017-04-11 13:29         ` [PATCH v4 5/5] hid-logitech-hidpp: add support for ratchet switch Mauro Carvalho Chehab
2017-04-14 12:56           ` Benjamin Tissoires
2017-04-14 12:54       ` [PATCH v4 3/5] input: add a EV_SW event " Benjamin Tissoires
2017-04-15 18:04       ` Dmitry Torokhov
2017-04-15 22:50         ` Mauro Carvalho Chehab
2017-04-15 17:55   ` [PATCH v4 1/5] input: event-codes: reserve some space for REL_MISC events Dmitry Torokhov
2017-06-21 12:05     ` Benjamin Tissoires

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5656f59d7fb0590dd139c5e6b597bd56e823bd94.1491917052.git.mchehab@s-opensource.com \
    --to=mchehab@s-opensource.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=corbet@lwn.net \
    --cc=dianders@chromium.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hans.verkuil@cisco.com \
    --cc=jkosina@suse.cz \
    --cc=kamil@wypas.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=pinglinux@gmail.com \
    --cc=roderick.colenbrander@sony.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.