aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-sensor-hub.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
index a76eb2a0a987..51d51d7b2dad 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -593,6 +593,20 @@ static __u8 *sensor_hub_report_fixup(struct hid_device *hdev, __u8 *rdesc,
593 } 593 }
594 } 594 }
595 595
596 /* Checks if the report descriptor of Thinkpad Helix 2 has a logical
597 * minimum for magnetic flux axis greater than the maximum */
598 if (hdev->product == USB_DEVICE_ID_TEXAS_INSTRUMENTS_LENOVO_YOGA &&
599 *rsize == 2558 && rdesc[913] == 0x17 && rdesc[914] == 0x40 &&
600 rdesc[915] == 0x81 && rdesc[916] == 0x08 &&
601 rdesc[917] == 0x00 && rdesc[918] == 0x27 &&
602 rdesc[921] == 0x07 && rdesc[922] == 0x00) {
603 /* Sets negative logical minimum for mag x, y and z */
604 rdesc[914] = rdesc[935] = rdesc[956] = 0xc0;
605 rdesc[915] = rdesc[936] = rdesc[957] = 0x7e;
606 rdesc[916] = rdesc[937] = rdesc[958] = 0xf7;
607 rdesc[917] = rdesc[938] = rdesc[959] = 0xff;
608 }
609
596 return rdesc; 610 return rdesc;
597} 611}
598 612