Skip to contentSkip to conversation

add ALWAYS_POLL quirk to lenovo pixart mouse

PATCH In review Tony Fischetti 3 participants 6 messages Mar 4, 2020 – Mar 15, 2020 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add ALWAYS_POLL quirk to lenovo pixart mouse

A lenovo pixart mouse (17ef:608d) is afflicted common the the malfunction where it disconnects and reconnects every minute--each time incrementing the device number. This patch adds the device id of the device and specifies that it needs the HID_QUIRK_ALWAYS_POLL quirk in order to work properly.

---
 drivers/hid/hid-ids.h    | 1 +
 drivers/hid/hid-quirks.c | 1 +
 2 files changed, 2 insertions(+)
drivers/hid/hid-ids.h +1 -0
index 3a400ce603c4..9e1dfc714ea8 100644
@@ -726,6 +726,7 @@
 #define USB_DEVICE_ID_LENOVO_X1_COVER	0x6085
 #define USB_DEVICE_ID_LENOVO_X1_TAB	0x60a3
 #define USB_DEVICE_ID_LENOVO_X1_TAB3	0x60b5
+#define USB_DEVICE_ID_LENOVO_PIXART_USB_OPTICAL_MOUSE	0x608d
 
 #define USB_VENDOR_ID_LG		0x1fd2
 #define USB_DEVICE_ID_LG_MULTITOUCH	0x0064
drivers/hid/hid-quirks.c +1 -0
index 0e7b2d998395..247747d6d8cf 100644
@@ -103,6 +103,7 @@ static const struct hid_device_id hid_quirks[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_PENSKETCH_M912), HID_QUIRK_MULTI_INPUT },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M406XE), HID_QUIRK_MULTI_INPUT },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_PIXART_USB_OPTICAL_MOUSE_ID2), HID_QUIRK_ALWAYS_POLL },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_C007), HID_QUIRK_ALWAYS_POLL },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_C077), HID_QUIRK_ALWAYS_POLL },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_KEYBOARD_G710_PLUS), HID_QUIRK_NOGET },
Signature · 1 line
2.20.1
maintainer
#1 lore raw
Quoted 5 lines · Tony Fischetti

A lenovo pixart mouse (17ef:608d) is afflicted common the the malfunction where it disconnects and reconnects every minute--each time incrementing the device number. This patch adds the device id of the device and specifies that it needs the HID_QUIRK_ALWAYS_POLL quirk in order to work properly.

You are missing Signed-off-by: line here (please see Documentation/process/5.Posting.rst and Documentation/process/submitting-patches.rst to read what this is about).

Also, we generally prefix all the patches to HID susbsytem with 'HID: ' in the subject / shortlog, so as you'll be resending with signoff, could you please fix that up at the same time as well?

Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs
#2 lore raw
In reply to Tony Fischetti
Quoted 15 lines · Tony Fischetti

A lenovo pixart mouse (17ef:608d) is afflicted common the the malfunction where it disconnects and reconnects every minute--each time incrementing the device number. This patch adds the device id of the device and specifies that it needs the HID_QUIRK_ALWAYS_POLL quirk in order to work properly.

---
 drivers/hid/hid-ids.h    | 1 +
 drivers/hid/hid-quirks.c | 1 +
 2 files changed, 2 insertions(+)
drivers/hid/hid-ids.h +0 -0
index 3a400ce603c4..9e1dfc714ea8 100644

drivers/hid/hid-ids.h line 729

Quoted 4 lines
drivers/hid/hid-ids.h +1 -0
@@ -726,6 +726,7 @@
 #define USB_DEVICE_ID_LENOVO_X1_COVER	0x6085
 #define USB_DEVICE_ID_LENOVO_X1_TAB	0x60a3
 #define USB_DEVICE_ID_LENOVO_X1_TAB3	0x60b5
+#define USB_DEVICE_ID_LENOVO_PIXART_USB_OPTICAL_MOUSE	0x608d

This ID is really ambiguous. Pixart makes the sensors for the big majority of devices. Isn't there any other identifier you could use? If there isn't, you could do USB_DEVICE_ID_LENOVO_MOUSE_608D.

Quoted 14 lines
drivers/hid/hid-ids.h +0 -0
 #define USB_VENDOR_ID_LG		0x1fd2
 #define USB_DEVICE_ID_LG_MULTITOUCH	0x0064
drivers/hid/hid-quirks.c +1 -0
index 0e7b2d998395..247747d6d8cf 100644
@@ -103,6 +103,7 @@ static const struct hid_device_id hid_quirks[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_PENSKETCH_M912), HID_QUIRK_MULTI_INPUT },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M406XE), HID_QUIRK_MULTI_INPUT },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_PIXART_USB_OPTICAL_MOUSE_ID2), HID_QUIRK_ALWAYS_POLL },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_C007), HID_QUIRK_ALWAYS_POLL },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_C077), HID_QUIRK_ALWAYS_POLL },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_KEYBOARD_G710_PLUS), HID_QUIRK_NOGET },
Signature · 1 line
Filipe Laíns
#3 lore raw

Thanks for the feedback, y'all.
I will rename the device and add the signed-off field and resubmit. Thanks again

Quoted 43 lines · Filipe Laíns
Quoted 15 lines · Tony Fischetti

A lenovo pixart mouse (17ef:608d) is afflicted common the the malfunction where it disconnects and reconnects every minute--each time incrementing the device number. This patch adds the device id of the device and specifies that it needs the HID_QUIRK_ALWAYS_POLL quirk in order to work properly.

---
 drivers/hid/hid-ids.h    | 1 +
 drivers/hid/hid-quirks.c | 1 +
 2 files changed, 2 insertions(+)
drivers/hid/hid-ids.h +0 -0
index 3a400ce603c4..9e1dfc714ea8 100644

drivers/hid/hid-ids.h line 729

Quoted 4 lines
drivers/hid/hid-ids.h +1 -0
@@ -726,6 +726,7 @@
 #define USB_DEVICE_ID_LENOVO_X1_COVER        0x6085
 #define USB_DEVICE_ID_LENOVO_X1_TAB  0x60a3
 #define USB_DEVICE_ID_LENOVO_X1_TAB3 0x60b5
+#define USB_DEVICE_ID_LENOVO_PIXART_USB_OPTICAL_MOUSE        0x608d

This ID is really ambiguous. Pixart makes the sensors for the big majority of devices. Isn't there any other identifier you could use? If there isn't, you could do USB_DEVICE_ID_LENOVO_MOUSE_608D.

Quoted 7 lines
drivers/hid/hid-ids.h +0 -0
 #define USB_VENDOR_ID_LG             0x1fd2
 #define USB_DEVICE_ID_LG_MULTITOUCH  0x0064
drivers/hid/hid-quirks.c +0 -0
index 0e7b2d998395..247747d6d8cf 100644

drivers/hid/hid-quirks.c static const struct hid_device_id hid_quirks[] = { · line 109

Quoted 7 lines
drivers/hid/hid-quirks.c +1 -0
@@ -103,6 +103,7 @@ static const struct hid_device_id hid_quirks[] = {
      { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_PENSKETCH_M912), HID_QUIRK_MULTI_INPUT },
      { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M406XE), HID_QUIRK_MULTI_INPUT },
      { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_PIXART_USB_OPTICAL_MOUSE_ID2), HID_QUIRK_ALWAYS_POLL },
+     { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
      { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_C007), HID_QUIRK_ALWAYS_POLL },
      { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_C077), HID_QUIRK_ALWAYS_POLL },
      { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_KEYBOARD_G710_PLUS), HID_QUIRK_NOGET },

--
Filipe Laíns

Signature · 4 lines
--
Tony Fischetti
[email protected]
(718) 431-4597
maintainer
#4 lore raw
Quoted 3 lines · Tony Fischetti

Thanks for the feedback, y'all.
I will rename the device and add the signed-off field and resubmit. Thanks again

Please do it as a followup patch on top of your previous one, as I've already pushed that one out and we are generally not rebasing live branches in hid.git.

Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs
#5 lore raw

Before I got your email, I sent the patch again, separately. I'm terribly sorry but I'm new to kernel development—how do I send it instead as a followup patch? Do you mean just responding to this thread with the new patch?

Quoted 17 lines · Jiri Kosina
Quoted 3 lines · Tony Fischetti

Thanks for the feedback, y'all.
I will rename the device and add the signed-off field and resubmit. Thanks again

Please do it as a followup patch on top of your previous one, as I've already pushed that one out and we are generally not rebasing live branches in hid.git.

Thanks,

--
Jiri Kosina
SUSE Labs

Signature · 4 lines
--
Tony Fischetti
[email protected]
(718) 431-4597