Skip to content

Commit b3c5bfc

Browse files
matjongregkh
authored andcommitted
HID: a4tech: use A4_2WHEEL_MOUSE_HACK_B8 for A4TECH NB-95
[ Upstream commit 9858c74 ] This mouse has a horizontal wheel that requires special handling. Without this patch, the horizontal wheel acts like a vertical wheel. In the output of `hidrd-convert` for this mouse, there is a `Usage (B8h)` field. It corresponds to a byte in packets sent by the device that specifies which wheel generated an input event. The name "A4TECH" is spelled in all capitals on the company website. Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent be6c988 commit b3c5bfc

4 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎drivers/hid/Kconfig‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ menu "Special HID drivers"
9393
depends on HID
9494

9595
config HID_A4TECH
96-
tristate "A4 tech mice"
96+
tristate "A4TECH mice"
9797
depends on HID
9898
default !EXPERT
9999
help
100-
Support for A4 tech X5 and WOP-35 / Trust 450L mice.
100+
Support for some A4TECH mice with two scroll wheels.
101101

102102
config HID_ACCUTOUCH
103103
tristate "Accutouch touch device"

‎drivers/hid/hid-a4tech.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ static const struct hid_device_id a4_devices[] = {
147147
.driver_data = A4_2WHEEL_MOUSE_HACK_B8 },
148148
{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_RP_649),
149149
.driver_data = A4_2WHEEL_MOUSE_HACK_B8 },
150+
{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_NB_95),
151+
.driver_data = A4_2WHEEL_MOUSE_HACK_B8 },
150152
{ }
151153
};
152154
MODULE_DEVICE_TABLE(hid, a4_devices);

‎drivers/hid/hid-ids.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#define USB_DEVICE_ID_A4TECH_WCP32PU 0x0006
2727
#define USB_DEVICE_ID_A4TECH_X5_005D 0x000a
2828
#define USB_DEVICE_ID_A4TECH_RP_649 0x001a
29+
#define USB_DEVICE_ID_A4TECH_NB_95 0x022b
2930

3031
#define USB_VENDOR_ID_AASHIMA 0x06d6
3132
#define USB_DEVICE_ID_AASHIMA_GAMEPAD 0x0025

‎drivers/hid/hid-quirks.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
213213
{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU) },
214214
{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D) },
215215
{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_RP_649) },
216+
{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_NB_95) },
216217
#endif
217218
#if IS_ENABLED(CONFIG_HID_ACCUTOUCH)
218219
{ HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_ACCUTOUCH_2216) },

0 commit comments

Comments
 (0)