summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/usb/hid-logitech-hidpp20.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/hw/usb/hid-logitech-hidpp20.c b/hw/usb/hid-logitech-hidpp20.c
index 72e610b5e2..51e9596151 100644
--- a/hw/usb/hid-logitech-hidpp20.c
+++ b/hw/usb/hid-logitech-hidpp20.c
@@ -376,8 +376,28 @@ static HIDPP20_FEATURE(feat_mousepointer)
static HIDPP20_FEATURE(feat_touchpadrawxy)
{
- return -HIDPP20_ERR_CODE_UNSUPPORTED; /* TODO STUB */
switch (fn) {
+ case 0: /* info = GetTouchpadInfo() */
+ /* NOTE: hard-coded for T650 */
+ params[0] = 0x0B; params[1] = 0x10; /* X max pixels */
+ params[2] = 0x09; params[3] = 0x3C; /* Y max pixels */
+ params[4] = 0x08; /* Z data range (in bits) */
+ params[5] = 0x08; /* area data size (in bits) */
+ params[6] = 0x08; /* timestamp unit 1ms */
+ params[7] = 0x0A; /* max fingers */
+ params[8] = 0x01; /* origin position: lower-left */
+ params[13] = 0x02; params[14] = 0x58; /* DPI (same for X and Y) */
+ return 15;
+ case 1: /* state = GetRawReportState() */
+ /* disable raw */
+ params[0] = 0;
+ return 1;
+ case 2: /* SetRawReportState(state) */
+ if (params[0] & 0x11) {
+ /* raw mode is not implemented (note: not sent by real hw) */
+ return -HIDPP20_ERR_CODE_UNSUPPORTED;
+ }
+ return 0;
default:
return -HIDPP20_ERR_CODE_INVALID_FUNCTION_ID;
}