Re: [PATCH v1] HID: logitech-hidpp: Detect hi-res scrolling support

From: Peter F. Patel-Schneider
Date: Thu Sep 15 2022 - 10:23:23 EST



On 9/14/22 11:41, Bastien Nocera wrote:
On Wed, 2022-09-14 at 15:21 +0200, Bastien Nocera wrote:
Rather than relying on a never-ending stream of patches for quirks.

This change will detect whether HID++ 1.0 hi-res scroll, HID++ 2.0
hi-res scroll or HID++ 2.0 hi-res scroll wheel is supported, and
enable
the feature without the need for quirks.

Tested on a Logitech M705 mouse that was unsupported before this
change.

[    9.365324] logitech-hidpp-device 0003:046D:406D.0006:
input,hidraw3: USB HID v1.11 Mouse [Logitech M705] on usb-
0000:00:14.0-4/input2:3
[   57.472434] logitech-hidpp-device 0003:046D:406D.0006: HID++ 4.5
device connected.
[   57.616429] logitech-hidpp-device 0003:046D:406D.0006: Detected
HID++ 2.0 hi-res scroll wheel
[   57.712424] logitech-hidpp-device 0003:046D:406D.0006: wheel
multiplier = 8

Link: https://bugzilla.kernel.org/show_bug.cgi?id=216480
Signed-off-by: Bastien Nocera <hadess@xxxxxxxxxx>
For anyone on a recent version of Fedora that wants to test it, those
packages should work:
https://koji.fedoraproject.org/koji/taskinfo?taskID=92008550

Cheers



Using this kernel I tested several Logitech mice - an MX Master 3, which already supported hi-res scrolling in Linux; an M310 and an M185, which have features but no feature for hi-res scrolling; and an old-style M510, which does not have features.  I used evtest to show the events that were generated.   For these mice the patch does not produce any change in events generated, as expected, both REL_WHEEL and REL_WHEEL_HI_RES events.


Peter F. Patel-Schneider