HID: ite: Only bind to keyboard USB interface on Acer SW5-012 keyboard dock
Subsystems (2)
PATCH v2 1/1 HID: ite: Only bind to keyboard USB interface on Acer SW5-012 keyboard dock
Commit 8f18eca9ebc5 ("HID: ite: Add USB id match for Acer SW5-012 keyboard dock") added the USB id for the Acer SW5-012's keyboard dock to the hid-ite driver to fix the rfkill driver not working.
Most keyboard docks with an ITE 8595 keyboard/touchpad controller have the "Wireless Radio Control" bits which need the special hid-ite driver on the second USB interface (the mouse interface) and their touchpad only supports mouse emulation, so using generic hid-input handling for anything but the "Wireless Radio Control" bits is fine. On these devices we simply bind to all USB interfaces.
But unlike other ITE8595 using keyboard docks, the Acer Aspire Switch 10 (SW5-012)'s touchpad not only does mouse emulation it also supports HID-multitouch and all the keys including the "Wireless Radio Control" bits have been moved to the first USB interface (the keyboard intf).
So we need hid-ite to handle the first (keyboard) USB interface and have it NOT bind to the second (mouse) USB interface so that that can be handled by hid-multitouch.c and we get proper multi-touch support.
This commit changes the hid_device_id for the SW5-012 keyboard dock to only match on hid devices from the HID_GROUP_GENERIC group, this way hid-ite will not bind the the mouse/multi-touch interface which has HID_GROUP_MULTITOUCH_WIN_8 as group.
This fixes the regression to mouse-emulation mode introduced by adding the keyboard dock USB id.
---
Changes in v2:
- Extend hid_device_id to also match on the HID_GROUP_GENERIC group, instead of adding a match callback which peeks at the USB descriptors
--- drivers/hid/hid-ite.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/hid/hid-ite.c +3 -2
@@ -41,8 +41,9 @@ static const struct hid_device_id ite_devices[] = { { HID_USB_DEVICE(USB_VENDOR_ID_ITE, USB_DEVICE_ID_ITE8595) }, { HID_USB_DEVICE(USB_VENDOR_ID_258A, USB_DEVICE_ID_258A_6A88) },/* ITE8595 USB kbd ctlr, with Synaptics touchpad connected to it. */ - { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, - USB_DEVICE_ID_SYNAPTICS_ACER_SWITCH5_012) }, + { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, +USB_VENDOR_ID_SYNAPTICS , + USB_DEVICE_ID_SYNAPTICS_ACER_SWITCH5_012) }, { } };MODULE_DEVICE_TABLE (hid, ite_devices);
Signature · 1 line
2.23.0
Benjamin Tissoires
AppliedQuoted 28 lines · Hans de Goede
Commit
8f18eca9ebc5("HID: ite: Add USB id match for Acer SW5-012 keyboard dock") added the USB id for the Acer SW5-012's keyboard dock to the hid-ite driver to fix the rfkill driver not working.Most keyboard docks with an ITE 8595 keyboard/touchpad controller have the "Wireless Radio Control" bits which need the special hid-ite driver on the second USB interface (the mouse interface) and their touchpad only supports mouse emulation, so using generic hid-input handling for anything but the "Wireless Radio Control" bits is fine. On these devices we simply bind to all USB interfaces.
But unlike other ITE8595 using keyboard docks, the Acer Aspire Switch 10 (SW5-012)'s touchpad not only does mouse emulation it also supports HID-multitouch and all the keys including the "Wireless Radio Control" bits have been moved to the first USB interface (the keyboard intf).
So we need hid-ite to handle the first (keyboard) USB interface and have it NOT bind to the second (mouse) USB interface so that that can be handled by
hid-multitouch.cand we get proper multi-touch support.This commit changes the
hid_device_idfor the SW5-012 keyboard dock to only match on hid devices from theHID_GROUP_GENERICgroup, this way hid-ite will not bind the the mouse/multi-touch interface which hasHID_GROUP_MULTITOUCH_WIN_8as group.
This fixes the regression to mouse-emulation mode introduced by adding the keyboard dock USB id.
Quoted 8 lines
Fixes 8f18eca9ebc5 ("HID: ite: Add USB id match for Acer SW5-012 keyboard dock")Reported-by Zdeněk Rampas <[email protected]>Signed-off-by Hans de Goede <[email protected]>---
Changes in v2:
- Extendhid_device_idto also match on theHID_GROUP_GENERICgroup, instead of adding a match callback which peeks at the USB descriptors
Thanks for the quick revision.
Applied to for-5.6/upstream-fixes
And for the record, 2 MR have been added to hid-tools for regression testing:
- https://gitlab.freedesktop.org/libevdev/hid-tools/merge_requests/70
(keyboard and wifi key)
- https://gitlab.freedesktop.org/libevdev/hid-tools/merge_requests/69
(touchpad, which currently fails on Linux master unless this patch gets in)
Cheers,
Benjamin
Quoted 23 lines
--- drivers/hid/hid-ite.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/hid/hid-ite.c +3
-3@@ -41,8 +41,9 @@ static const struct hid_device_id ite_devices[] = { { HID_USB_DEVICE(USB_VENDOR_ID_ITE, USB_DEVICE_ID_ITE8595) }, { HID_USB_DEVICE(USB_VENDOR_ID_258A, USB_DEVICE_ID_258A_6A88) },/* ITE8595 USB kbd ctlr, with Synaptics touchpad connected to it. */ - { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, - USB_DEVICE_ID_SYNAPTICS_ACER_SWITCH5_012) }, + { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, +USB_VENDOR_ID_SYNAPTICS , + USB_DEVICE_ID_SYNAPTICS_ACER_SWITCH5_012) }, { } };MODULE_DEVICE_TABLE (hid, ite_devices); --2.23.0
HI,
Quoted 40 lines · Benjamin Tissoires
Quoted 28 lines · Hans de Goede
Commit
8f18eca9ebc5("HID: ite: Add USB id match for Acer SW5-012 keyboard dock") added the USB id for the Acer SW5-012's keyboard dock to the hid-ite driver to fix the rfkill driver not working.Most keyboard docks with an ITE 8595 keyboard/touchpad controller have the "Wireless Radio Control" bits which need the special hid-ite driver on the second USB interface (the mouse interface) and their touchpad only supports mouse emulation, so using generic hid-input handling for anything but the "Wireless Radio Control" bits is fine. On these devices we simply bind to all USB interfaces.
But unlike other ITE8595 using keyboard docks, the Acer Aspire Switch 10 (SW5-012)'s touchpad not only does mouse emulation it also supports HID-multitouch and all the keys including the "Wireless Radio Control" bits have been moved to the first USB interface (the keyboard intf).
So we need hid-ite to handle the first (keyboard) USB interface and have it NOT bind to the second (mouse) USB interface so that that can be handled by
hid-multitouch.cand we get proper multi-touch support.This commit changes the
hid_device_idfor the SW5-012 keyboard dock to only match on hid devices from theHID_GROUP_GENERICgroup, this way hid-ite will not bind the the mouse/multi-touch interface which hasHID_GROUP_MULTITOUCH_WIN_8as group.
This fixes the regression to mouse-emulation mode introduced by adding the keyboard dock USB id.Quoted 8 lines
Fixes 8f18eca9ebc5 ("HID: ite: Add USB id match for Acer SW5-012 keyboard dock")Reported-by Zdeněk Rampas <[email protected]>Signed-off-by Hans de Goede <[email protected]>---
Changes in v2:
- Extendhid_device_idto also match on theHID_GROUP_GENERICgroup, instead of adding a match callback which peeks at the USB descriptorsThanks for the quick revision.
Quoted 8 lines
Applied to for-5.6/upstream-fixes
And for the record, 2 MR have been added to hid-tools for regression testing:
- https://gitlab.freedesktop.org/libevdev/hid-tools/merge_requests/70
(keyboard and wifi key)
- https://gitlab.freedesktop.org/libevdev/hid-tools/merge_requests/69
(touchpad, which currently fails on Linux master unless this patch gets in)
Cool, thank you for doing that.
Regards,
Hans
Quoted 24 lines
Quoted 23 lines
--- drivers/hid/hid-ite.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/hid/hid-ite.c +3
-3@@ -41,8 +41,9 @@ static const struct hid_device_id ite_devices[] = { { HID_USB_DEVICE(USB_VENDOR_ID_ITE, USB_DEVICE_ID_ITE8595) }, { HID_USB_DEVICE(USB_VENDOR_ID_258A, USB_DEVICE_ID_258A_6A88) },/* ITE8595 USB kbd ctlr, with Synaptics touchpad connected to it. */ - { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, - USB_DEVICE_ID_SYNAPTICS_ACER_SWITCH5_012) }, + { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, +USB_VENDOR_ID_SYNAPTICS , + USB_DEVICE_ID_SYNAPTICS_ACER_SWITCH5_012) }, { } };MODULE_DEVICE_TABLE (hid, ite_devices); --2.23.0