OSDN Git Service

HID: logitech: Enable high-resolution scrolling on Logitech mice
authorHarry Cutts <hcutts@chromium.org>
Wed, 5 Dec 2018 00:42:27 +0000 (10:42 +1000)
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>
Fri, 7 Dec 2018 15:27:15 +0000 (16:27 +0100)
commit4435ff2f09a2fc43d1201d732e6e606b4d4b1ad5
tree2d3acbe104f17b7bceaefccc55a461b66c5f50d1
parent95c3d00282ce6a4911e3050a3b48a194ba16e9e5
HID: logitech: Enable high-resolution scrolling on Logitech mice

There are three features used by various Logitech mice for
high-resolution scrolling: the scrolling acceleration bit in HID++ 1.0,
and the x2120 and x2121 features in HID++ 2.0 and above. This patch
supports all three, and uses the multiplier reported by the mouse for
the HID++ 2.0+ features.

The full list of product IDs of mice which support high-resolution
scrolling was provided by Logitech, but the patch was tested using the
following mice (using the Unifying receiver):

* HID++ 1.0: Anywhere MX, Performance MX
* x2120: M560
* x2121: MX Anywhere 2, MX Master 2S

This patch is a combinations of the now-reverted commits 1ff2e1a44e0,
d56ca9855bf95fe2ccbef9d044ee89028 together with some extra bits for the
directional and timeout-based reset.
The previous patch series was in hid-input, it appears this remainder
handling is logitech-specific and was moved to hid-logitech-hidpp.c and
renamed accordingly.

Signed-off-by: Harry Cutts <hcutts@chromium.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Verified-by: Harry Cutts <hcutts@chromium.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
drivers/hid/hid-logitech-hidpp.c