summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/usb/hid-logitech-hidpp20.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/hw/usb/hid-logitech-hidpp20.c b/hw/usb/hid-logitech-hidpp20.c
index c69f6fd9c0..72e610b5e2 100644
--- a/hw/usb/hid-logitech-hidpp20.c
+++ b/hw/usb/hid-logitech-hidpp20.c
@@ -314,6 +314,31 @@ static HIDPP20_FEATURE(feat_verticalscrolling)
}
}
+/* unknown, hidden feature found on T400 */
+static HIDPP20_FEATURE(feat_2101)
+{
+ switch (fn) {
+ case 0: /* ?? func with no params */
+ params[0] = params[1] = params[2] = 3;
+ params[3] = 2;
+ return 4;
+ case 1: /* ?? */
+ if (params[0] > 3) {
+ return -HIDPP20_ERR_CODE_INVALIDARGUMENT;
+ }
+ params[0] = params[1] = 3;
+ params[2] = params[0];
+ params[3] = 2;
+ return 4;
+ case 2: /* ?? not seen, but probed manually. No params */
+ params[0] = 0;
+ params[1] = 0x14;
+ return 2;
+ default:
+ return -HIDPP20_ERR_CODE_INVALID_FUNCTION_ID;
+ }
+}
+
static HIDPP20_FEATURE(feat_hiresscrolling)
{
switch (fn) {
@@ -447,7 +472,7 @@ static const HidppFeature features_t400[] = {
{ 0x1F03, HIDPP20_FEAT_TYPE_HIDDEN | HIDPP20_FEAT_TYPE_INTERNAL, feat_unknown },
{ 0x1F04, HIDPP20_FEAT_TYPE_HIDDEN | HIDPP20_FEAT_TYPE_INTERNAL, feat_unknown },
{ 0x2100, 0, feat_verticalscrolling },
- { 0x2101, HIDPP20_FEAT_TYPE_HIDDEN, feat_unknown },
+ { 0x2101, HIDPP20_FEAT_TYPE_HIDDEN, feat_2101 },
{ 0x2120, 0, feat_hiresscrolling },
{ 0x2200, 0, feat_mousepointer },
{ 0x6110, HIDPP20_FEAT_TYPE_HIDDEN, feat_touchmouserawpoints },