* [PATCH] HID: logitech-hidpp: Hard-code HID++ 1.0 fast scroll support
@ 2023-01-16 13:09 Bastien Nocera
2023-01-25 10:21 ` Benjamin Tissoires
0 siblings, 1 reply; 2+ messages in thread
From: Bastien Nocera @ 2023-01-16 13:09 UTC (permalink / raw)
To: linux-input
Cc: linux-kernel, Jiri Kosina, Benjamin Tissoires,
Peter F . Patel-Schneider, Filipe Laíns,
Nestor Lopez Casado
HID++ 1.0 devices only export whether Fast Scrolling is enabled, not
whether they are capable of it. Reinstate the original quirks for the 3
supported mice so fast scrolling works again on those devices.
Fixes: 908d325 ("HID: logitech-hidpp: Detect hi-res scrolling support")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216903
Signed-off-by: Bastien Nocera <hadess@hadess.net>
---
drivers/hid/hid-logitech-hidpp.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index abf2c95e4d0b..fa026e9107c5 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -77,6 +77,7 @@ MODULE_PARM_DESC(disable_tap_to_click,
#define HIDPP_QUIRK_HIDPP_WHEELS BIT(26)
#define HIDPP_QUIRK_HIDPP_EXTRA_MOUSE_BTNS BIT(27)
#define HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS BIT(28)
+#define HIDPP_QUIRK_HI_RES_SCROLL_1P0 BIT(29)
/* These are just aliases for now */
#define HIDPP_QUIRK_KBD_SCROLL_WHEEL HIDPP_QUIRK_HIDPP_WHEELS
@@ -3472,14 +3473,8 @@ static int hidpp_initialize_hires_scroll(struct hidpp_device *hidpp)
hid_dbg(hidpp->hid_dev, "Detected HID++ 2.0 hi-res scrolling\n");
}
} else {
- struct hidpp_report response;
-
- ret = hidpp_send_rap_command_sync(hidpp,
- REPORT_ID_HIDPP_SHORT,
- HIDPP_GET_REGISTER,
- HIDPP_ENABLE_FAST_SCROLL,
- NULL, 0, &response);
- if (!ret) {
+ /* We cannot detect fast scrolling support on HID++ 1.0 devices */
+ if (hidpp->quirks & HIDPP_QUIRK_HI_RES_SCROLL_1P0) {
hidpp->capabilities |= HIDPP_CAPABILITY_HIDPP10_FAST_SCROLL;
hid_dbg(hidpp->hid_dev, "Detected HID++ 1.0 fast scroll\n");
}
@@ -4296,9 +4291,15 @@ static const struct hid_device_id hidpp_devices[] = {
HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH,
USB_DEVICE_ID_LOGITECH_T651),
.driver_data = HIDPP_QUIRK_CLASS_WTP },
+ { /* Mouse Logitech Anywhere MX */
+ LDJ_DEVICE(0x1017), .driver_data = HIDPP_QUIRK_HI_RES_SCROLL_1P0 },
{ /* Mouse logitech M560 */
LDJ_DEVICE(0x402d),
.driver_data = HIDPP_QUIRK_DELAYED_INIT | HIDPP_QUIRK_CLASS_M560 },
+ { /* Mouse Logitech M705 (firmware RQM17) */
+ LDJ_DEVICE(0x101b), .driver_data = HIDPP_QUIRK_HI_RES_SCROLL_1P0 },
+ { /* Mouse Logitech Performance MX */
+ LDJ_DEVICE(0x101a), .driver_data = HIDPP_QUIRK_HI_RES_SCROLL_1P0 },
{ /* Keyboard logitech K400 */
LDJ_DEVICE(0x4024),
.driver_data = HIDPP_QUIRK_CLASS_K400 },
--
2.39.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] HID: logitech-hidpp: Hard-code HID++ 1.0 fast scroll support
2023-01-16 13:09 [PATCH] HID: logitech-hidpp: Hard-code HID++ 1.0 fast scroll support Bastien Nocera
@ 2023-01-25 10:21 ` Benjamin Tissoires
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Tissoires @ 2023-01-25 10:21 UTC (permalink / raw)
To: Bastien Nocera
Cc: linux-input, linux-kernel, Jiri Kosina,
Peter F . Patel-Schneider, Filipe Laíns,
Nestor Lopez Casado
On Mon, Jan 16, 2023 at 2:09 PM Bastien Nocera <hadess@hadess.net> wrote:
>
> HID++ 1.0 devices only export whether Fast Scrolling is enabled, not
> whether they are capable of it. Reinstate the original quirks for the 3
> supported mice so fast scrolling works again on those devices.
>
> Fixes: 908d325 ("HID: logitech-hidpp: Detect hi-res scrolling support")
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=216903
> Signed-off-by: Bastien Nocera <hadess@hadess.net>
> ---
Applied to for-6.3/logitech
Thanks!
Cheers,
Benjamin
> drivers/hid/hid-logitech-hidpp.c | 17 +++++++++--------
> 1 file changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
> index abf2c95e4d0b..fa026e9107c5 100644
> --- a/drivers/hid/hid-logitech-hidpp.c
> +++ b/drivers/hid/hid-logitech-hidpp.c
> @@ -77,6 +77,7 @@ MODULE_PARM_DESC(disable_tap_to_click,
> #define HIDPP_QUIRK_HIDPP_WHEELS BIT(26)
> #define HIDPP_QUIRK_HIDPP_EXTRA_MOUSE_BTNS BIT(27)
> #define HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS BIT(28)
> +#define HIDPP_QUIRK_HI_RES_SCROLL_1P0 BIT(29)
>
> /* These are just aliases for now */
> #define HIDPP_QUIRK_KBD_SCROLL_WHEEL HIDPP_QUIRK_HIDPP_WHEELS
> @@ -3472,14 +3473,8 @@ static int hidpp_initialize_hires_scroll(struct hidpp_device *hidpp)
> hid_dbg(hidpp->hid_dev, "Detected HID++ 2.0 hi-res scrolling\n");
> }
> } else {
> - struct hidpp_report response;
> -
> - ret = hidpp_send_rap_command_sync(hidpp,
> - REPORT_ID_HIDPP_SHORT,
> - HIDPP_GET_REGISTER,
> - HIDPP_ENABLE_FAST_SCROLL,
> - NULL, 0, &response);
> - if (!ret) {
> + /* We cannot detect fast scrolling support on HID++ 1.0 devices */
> + if (hidpp->quirks & HIDPP_QUIRK_HI_RES_SCROLL_1P0) {
> hidpp->capabilities |= HIDPP_CAPABILITY_HIDPP10_FAST_SCROLL;
> hid_dbg(hidpp->hid_dev, "Detected HID++ 1.0 fast scroll\n");
> }
> @@ -4296,9 +4291,15 @@ static const struct hid_device_id hidpp_devices[] = {
> HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH,
> USB_DEVICE_ID_LOGITECH_T651),
> .driver_data = HIDPP_QUIRK_CLASS_WTP },
> + { /* Mouse Logitech Anywhere MX */
> + LDJ_DEVICE(0x1017), .driver_data = HIDPP_QUIRK_HI_RES_SCROLL_1P0 },
> { /* Mouse logitech M560 */
> LDJ_DEVICE(0x402d),
> .driver_data = HIDPP_QUIRK_DELAYED_INIT | HIDPP_QUIRK_CLASS_M560 },
> + { /* Mouse Logitech M705 (firmware RQM17) */
> + LDJ_DEVICE(0x101b), .driver_data = HIDPP_QUIRK_HI_RES_SCROLL_1P0 },
> + { /* Mouse Logitech Performance MX */
> + LDJ_DEVICE(0x101a), .driver_data = HIDPP_QUIRK_HI_RES_SCROLL_1P0 },
> { /* Keyboard logitech K400 */
> LDJ_DEVICE(0x4024),
> .driver_data = HIDPP_QUIRK_CLASS_K400 },
> --
> 2.39.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-25 10:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-16 13:09 [PATCH] HID: logitech-hidpp: Hard-code HID++ 1.0 fast scroll support Bastien Nocera
2023-01-25 10:21 ` 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).