linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Add support for high-resolution scrolling on Logitech mice
@ 2018-08-23 18:30 Harry Cutts
  2018-08-23 18:30 ` [PATCH 1/3] Add the `REL_WHEEL_HI_RES` event code Harry Cutts
  0 siblings, 1 reply; 7+ messages in thread
From: Harry Cutts @ 2018-08-23 18:30 UTC (permalink / raw)
  To: linux-input, LKML
  Cc: Jiri Kosina, Dmitry Torokhov, Benjamin Tissoires, Harry Cutts,
	linux-doc, Jonathan Corbet, Jiri Kosina

Hi everyone,

This set of patches adds support for high-resolution scroll wheels on
Logitech mice. See the linux-input "Reporting high-resolution scroll
events" thread [0] for previous discussion of the evdev changes. I would
love to hear your feedback.

Thanks,

Harry Cutts
Chrome OS Touch/Input team

[0]: https://www.spinics.net/lists/linux-input/msg57380.html



Harry Cutts (3):
  Add the `REL_WHEEL_HI_RES` event code
  Create a utility class for counting scroll events
  Enable high-resolution scrolling on Logitech mice

 Documentation/input/event-codes.rst    |  11 +-
 drivers/hid/hid-ids.h                  |  15 ++
 drivers/hid/hid-input.c                |  44 ++++
 drivers/hid/hid-logitech-hidpp.c       | 341 +++++++++++++++++++++++--
 drivers/hid/hid-quirks.c               |  11 +
 include/linux/hid.h                    |  28 ++
 include/uapi/linux/input-event-codes.h |   1 +
 7 files changed, 423 insertions(+), 28 deletions(-)

-- 
2.18.0.1017.ga543ac7ca45-goog


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] Add the `REL_WHEEL_HI_RES` event code
  2018-08-23 18:30 [PATCH 0/3] Add support for high-resolution scrolling on Logitech mice Harry Cutts
@ 2018-08-23 18:30 ` Harry Cutts
  2018-08-23 18:42   ` Dmitry Torokhov
  2018-08-23 18:57   ` Matthew Wilcox
  0 siblings, 2 replies; 7+ messages in thread
From: Harry Cutts @ 2018-08-23 18:30 UTC (permalink / raw)
  To: linux-input, LKML
  Cc: Jiri Kosina, Dmitry Torokhov, Benjamin Tissoires, Harry Cutts,
	linux-doc, Jonathan Corbet

This event code represents scroll reports from high-resolution wheels,
and will be used by future patches in this series. See the linux-input
"Reporting high-resolution scroll events" thread [0] for more details.

[0]: https://www.spinics.net/lists/linux-input/msg57380.html

Signed-off-by: Harry Cutts <hcutts@chromium.org>
---

 Documentation/input/event-codes.rst    | 11 ++++++++++-
 include/uapi/linux/input-event-codes.h |  1 +
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/Documentation/input/event-codes.rst b/Documentation/input/event-codes.rst
index a8c0873beb95..df024cb82829 100644
--- a/Documentation/input/event-codes.rst
+++ b/Documentation/input/event-codes.rst
@@ -190,7 +190,16 @@ A few EV_REL codes have special meanings:
 * REL_WHEEL, REL_HWHEEL:
 
   - These codes are used for vertical and horizontal scroll wheels,
-    respectively.
+    respectively. The value is the number of "notches" moved on the wheel, the
+    physical size of which varies by device. For high-resolution wheels (which
+    report multiple events for each notch of movement, or do not have notches)
+    this may be an approximation based on the high-resolution scroll events.
+
+* REL_WHEEL_HI_RES:
+
+  - If a vertical scroll wheel supports high-resolution scrolling, this code
+    will be emitted in addition to REL_WHEEL. The value is the (approximate)
+    distance travelled by the user's finger, in 256ths of a millimeter.
 
 EV_ABS
 ------
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 53fbae27b280..dad8d3890a3a 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -708,6 +708,7 @@
 #define REL_DIAL		0x07
 #define REL_WHEEL		0x08
 #define REL_MISC		0x09
+#define REL_WHEEL_HI_RES	0x0a
 #define REL_MAX			0x0f
 #define REL_CNT			(REL_MAX+1)
 
-- 
2.18.0.1017.ga543ac7ca45-goog


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] Add the `REL_WHEEL_HI_RES` event code
  2018-08-23 18:30 ` [PATCH 1/3] Add the `REL_WHEEL_HI_RES` event code Harry Cutts
@ 2018-08-23 18:42   ` Dmitry Torokhov
  2018-08-23 18:57   ` Matthew Wilcox
  1 sibling, 0 replies; 7+ messages in thread
From: Dmitry Torokhov @ 2018-08-23 18:42 UTC (permalink / raw)
  To: Harry Cutts
  Cc: linux-input, LKML, Jiri Kosina, Benjamin Tissoires, linux-doc,
	Jonathan Corbet

On Thu, Aug 23, 2018 at 11:30:55AM -0700, Harry Cutts wrote:
> This event code represents scroll reports from high-resolution wheels,
> and will be used by future patches in this series. See the linux-input
> "Reporting high-resolution scroll events" thread [0] for more details.
> 
> [0]: https://www.spinics.net/lists/linux-input/msg57380.html
> 
> Signed-off-by: Harry Cutts <hcutts@chromium.org>

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Jiri, Benjamin, feel free to merge through HID tree if the rest is
acceptable.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] Add the `REL_WHEEL_HI_RES` event code
  2018-08-23 18:30 ` [PATCH 1/3] Add the `REL_WHEEL_HI_RES` event code Harry Cutts
  2018-08-23 18:42   ` Dmitry Torokhov
@ 2018-08-23 18:57   ` Matthew Wilcox
  2018-08-23 19:01     ` Dmitry Torokhov
  1 sibling, 1 reply; 7+ messages in thread
From: Matthew Wilcox @ 2018-08-23 18:57 UTC (permalink / raw)
  To: Harry Cutts
  Cc: linux-input, LKML, Jiri Kosina, Dmitry Torokhov,
	Benjamin Tissoires, linux-doc, Jonathan Corbet

On Thu, Aug 23, 2018 at 11:30:55AM -0700, Harry Cutts wrote:
> +  - If a vertical scroll wheel supports high-resolution scrolling, this code
> +    will be emitted in addition to REL_WHEEL. The value is the (approximate)
> +    distance travelled by the user's finger, in 256ths of a millimeter.

Is it too late to change this to an actual unit like micrometres?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] Add the `REL_WHEEL_HI_RES` event code
  2018-08-23 18:57   ` Matthew Wilcox
@ 2018-08-23 19:01     ` Dmitry Torokhov
  2018-08-28  9:02       ` Jiri Kosina
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Torokhov @ 2018-08-23 19:01 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Harry Cutts, linux-input, LKML, Jiri Kosina, Benjamin Tissoires,
	linux-doc, Jonathan Corbet

On Thu, Aug 23, 2018 at 11:57:22AM -0700, Matthew Wilcox wrote:
> On Thu, Aug 23, 2018 at 11:30:55AM -0700, Harry Cutts wrote:
> > +  - If a vertical scroll wheel supports high-resolution scrolling, this code
> > +    will be emitted in addition to REL_WHEEL. The value is the (approximate)
> > +    distance travelled by the user's finger, in 256ths of a millimeter.
> 
> Is it too late to change this to an actual unit like micrometres?

No love for imperial roots? Sure, micrometers would work too I think.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] Add the `REL_WHEEL_HI_RES` event code
  2018-08-23 19:01     ` Dmitry Torokhov
@ 2018-08-28  9:02       ` Jiri Kosina
  2018-08-28 17:49         ` Harry Cutts
  0 siblings, 1 reply; 7+ messages in thread
From: Jiri Kosina @ 2018-08-28  9:02 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Matthew Wilcox, Harry Cutts, linux-input, LKML, Jiri Kosina,
	Benjamin Tissoires, linux-doc, Jonathan Corbet

On Thu, 23 Aug 2018, Dmitry Torokhov wrote:

> > > +  - If a vertical scroll wheel supports high-resolution scrolling, this code
> > > +    will be emitted in addition to REL_WHEEL. The value is the (approximate)
> > > +    distance travelled by the user's finger, in 256ths of a millimeter.
> > 
> > Is it too late to change this to an actual unit like micrometres?
> 
> No love for imperial roots? Sure, micrometers would work too I think.

I don't really care strongly :) Is either of you going to update the 
patch? Otherwise I'll just apply as-is.

Thanks,

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] Add the `REL_WHEEL_HI_RES` event code
  2018-08-28  9:02       ` Jiri Kosina
@ 2018-08-28 17:49         ` Harry Cutts
  0 siblings, 0 replies; 7+ messages in thread
From: Harry Cutts @ 2018-08-28 17:49 UTC (permalink / raw)
  To: jikos
  Cc: dmitry.torokhov, willy, linux-input, linux-kernel, jiri.kosina,
	benjamin.tissoires, linux-doc, corbet

Benjamin says he prefers micrometres, and I think I do to now that I
think about it (sticking with SI seems like a good idea), so I'll
update it in a V2.

Harry Cutts
Chrome OS Touch/Input team
Harry Cutts
Chrome OS Touch/Input team


On Tue, 28 Aug 2018 at 02:02, Jiri Kosina <jikos@kernel.org> wrote:
>
> On Thu, 23 Aug 2018, Dmitry Torokhov wrote:
>
> > > > +  - If a vertical scroll wheel supports high-resolution scrolling, this code
> > > > +    will be emitted in addition to REL_WHEEL. The value is the (approximate)
> > > > +    distance travelled by the user's finger, in 256ths of a millimeter.
> > >
> > > Is it too late to change this to an actual unit like micrometres?
> >
> > No love for imperial roots? Sure, micrometers would work too I think.
>
> I don't really care strongly :) Is either of you going to update the
> patch? Otherwise I'll just apply as-is.
>
> Thanks,
>
> --
> Jiri Kosina
> SUSE Labs
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-08-28 17:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-23 18:30 [PATCH 0/3] Add support for high-resolution scrolling on Logitech mice Harry Cutts
2018-08-23 18:30 ` [PATCH 1/3] Add the `REL_WHEEL_HI_RES` event code Harry Cutts
2018-08-23 18:42   ` Dmitry Torokhov
2018-08-23 18:57   ` Matthew Wilcox
2018-08-23 19:01     ` Dmitry Torokhov
2018-08-28  9:02       ` Jiri Kosina
2018-08-28 17:49         ` Harry Cutts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).