linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] HID: MS and Logitech high-resolution scroll wheel support
@ 2018-11-22  6:34 Peter Hutterer
  2018-11-22  6:34 ` [PATCH 1/8] Input: add `REL_WHEEL_HI_RES` and `REL_HWHEEL_HI_RES` Peter Hutterer
                   ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: Peter Hutterer @ 2018-11-22  6:34 UTC (permalink / raw)
  To: linux-input
  Cc: Dmitry Torokhov, Jiri Kosina, Harry Cutts, torvalds,
	Nestor Lopez Casado, linux-kernel, Benjamin Tissoires


This series enables high-resolution scrolling on some or many Microsoft mice
of the last decade and Logitech mice with the required feature support.

High resolution scrolling is exposed to userspace as REL_WHEEL_HI_RES and
REL_HWHEEL_HI_RES. An accumulated value of 120 signals one wheel click, mice
with higher granularity can send multiple values that are fractions of 120.
REL_WHEEL and REL_HWHEEL are emulated for backwards compatibility.
The 120 magic number comes from Windows and affects how hardware vendors
build their shiny (and the use of a multiplier in the hw that is a whole
fraction of 120).

This series adds implementations for generic HID and for Logitech's HID++.

Windows Vista added the Resolution Multiplier HID feature which gives
us a multiplier that is applied (in hardware) to the wheel data. For the
same physical motion and an example multiplier of 8, the hardware may: 
- send 8 events of value 1, or
- send 1 event of value 8, or
- send 8/n events of value 1 * n
The multiplier is a HID Feature and should default to an effective 1 in the
hardware. Windows Vista and newer set this to the logical maximum, we do the
same now. It's an approved HID Feature but so far, this feature has only
been found on some Microsoft mice.

Logitech mice do not seem to use it and have their own HID++ protocol to
apply that multiplier. Harry's patchset had previously been merged, the
exact implementation was incompatible with the Microsoft bits though so it
was reverted. Harry's patches in this series are adjusted accordingly but
are by and large the same.

Notable: The Logitech REL_WHEEL emulation cannot just hook into the HID
bits. The firmware drops some events so the point when we get the REL_WHEEL
event moves around. This is worked around by directional resets and a
timeout-based reset.

Devices tested:
- Microsoft Comfort Optical Mouse 3000
- Microsoft Sculpt Ergonomic Mouse
- Microsoft Surface mouse
- Logitech MX Anywhere 2S

The following devices were tested for the HID feature and didn't have it:
- Logitech G500s, G303
- Roccat Kone XTD
- all the cheap Lenovo, HP, Dell, Logitech USB mice that come with a
  workstation that I could find in the local office
- Etekcity something something
- Razer Imperator
- Microsoft Classic IntelliMouse
- Microsoft Surface Mobile Mouse

Cheers,
  Peter

Harry Cutts (3):
      HID: logitech: Use LDJ_DEVICE macro for existing Logitech mice
      HID: logitech: Add function to enable HID++ 1.0 "scrolling acceleration"
      HID: logitech: Enable high-resolution scrolling on Logitech mice

Peter Hutterer (5):
      Input: add `REL_WHEEL_HI_RES` and `REL_HWHEEL_HI_RES`
      HID: core: store the collections as a basic tree
      HID: core: process the Resolution Multiplier
      HID: input: use the Resolution Multiplier for high-resolution scrolling
      HID: logitech-hidpp: fix typo, hiddpp to hidpp

 Documentation/input/event-codes.rst    |  21 +++-
 drivers/hid/hid-core.c                 | 174 ++++++++++++++++++++++++++++++++
 drivers/hid/hid-input.c                | 137 ++++++++++++++++++++++++-
 drivers/hid/hid-logitech-hidpp.c       | 384 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
 include/linux/hid.h                    |  10 ++
 include/uapi/linux/input-event-codes.h |   2 +
 6 files changed, 690 insertions(+), 38 deletions(-)



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

end of thread, other threads:[~2018-11-29 10:25 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-22  6:34 [PATCH 0/8] HID: MS and Logitech high-resolution scroll wheel support Peter Hutterer
2018-11-22  6:34 ` [PATCH 1/8] Input: add `REL_WHEEL_HI_RES` and `REL_HWHEEL_HI_RES` Peter Hutterer
2018-11-22  6:34 ` [PATCH 2/8] HID: core: store the collections as a basic tree Peter Hutterer
2018-11-22  6:34 ` [PATCH 3/8] HID: core: process the Resolution Multiplier Peter Hutterer
2018-11-22  6:34 ` [PATCH 4/8] HID: input: use the Resolution Multiplier for high-resolution scrolling Peter Hutterer
2018-11-22 23:28   ` Peter Hutterer
2018-11-27  2:17     ` Harry Cutts
2018-11-27  2:30     ` Linus Torvalds
2018-11-27 23:51       ` Peter Hutterer
2018-11-28  3:40   ` [PATCH v2 " Peter Hutterer
2018-11-22  6:34 ` [PATCH 5/8] HID: logitech-hidpp: fix typo, hiddpp to hidpp Peter Hutterer
2018-11-22  6:34 ` [PATCH 6/8] HID: logitech: Use LDJ_DEVICE macro for existing Logitech mice Peter Hutterer
2018-11-22  6:34 ` [PATCH 7/8] HID: logitech: Add function to enable HID++ 1.0 "scrolling acceleration" Peter Hutterer
2018-11-22  6:34 ` [PATCH 8/8] HID: logitech: Enable high-resolution scrolling on Logitech mice Peter Hutterer
2018-11-22 17:05   ` Linus Torvalds
2018-11-28  3:38   ` [PATCH v2 " Peter Hutterer
2018-11-28 23:03   ` [PATCH " Harry Cutts
2018-11-28 23:22 ` [PATCH 0/8] HID: MS and Logitech high-resolution scroll wheel support Harry Cutts
2018-11-29  4:27   ` Peter Hutterer
2018-11-29 10:25     ` Benjamin Tissoires

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).