Skip to contentSkip to conversation

iio:hid-sensor-hub: Add in quirk for sensor hub in Lenovo Ideapad Yogas

PATCH In review Peter F. Patel-Schneider 3 participants 3 messages May 5, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio:hid-sensor-hub: Add in quirk for sensor hub in Lenovo Ideapad Yogas

The sensor hub in Lenovo Yogas needs the enumeration quirk. I've been running the patch for over a month with no problems, whereas the unpatched drivers reliably mis-initialized the sensors. (This is a resending of a previous patch that had formatting issues.)

---
 drivers/hid/hid-ids.h        | 3 +++
 drivers/hid/hid-sensor-hub.c | 3 +++
 2 files changed, 6 insertions(+)
drivers/hid/hid-ids.h +3 -0
index 5a5248f..f944e37 100644
@@ -823,6 +823,9 @@
 #define USB_DEVICE_ID_SYNAPTICS_HD	0x0ac3
 #define USB_DEVICE_ID_SYNAPTICS_QUAD_HD	0x1ac3
 
+#define USB_VENDOR_ID_TEXAS_INSTRUMENTS	0x2047
+#define USB_DEVICE_ID_TEXAS_INSTRUMENTS_LENOVO_YOGA	0x0855
+
 #define USB_VENDOR_ID_THINGM		0x27b8
 #define USB_DEVICE_ID_BLINK1		0x01ed
 
drivers/hid/hid-sensor-hub.c +3 -0
index 46f4480..597732b 100644
@@ -665,6 +665,9 @@ static const struct hid_device_id sensor_hub_devices[] = {
 	{ HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_INTEL_1,
 			USB_DEVICE_ID_INTEL_HID_SENSOR),
 			.driver_data = HID_SENSOR_HUB_ENUM_QUIRK},
+	{ HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_TEXAS_INSTRUMENTS,
+		     USB_DEVICE_ID_TEXAS_INSTRUMENTS_LENOVO_YOGA),
+		     .driver_data = HID_SENSOR_HUB_ENUM_QUIRK},
 	{ HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, HID_ANY_ID,
 		     HID_ANY_ID) },
 	{ }
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 36 lines · Peter F. Patel-Schneider

The sensor hub in Lenovo Yogas needs the enumeration quirk. I've been running the patch for over a month with no problems, whereas the unpatched drivers reliably mis-initialized the sensors. (This is a resending of a previous patch that had formatting issues.)

---
 drivers/hid/hid-ids.h        | 3 +++
 drivers/hid/hid-sensor-hub.c | 3 +++
 2 files changed, 6 insertions(+)
drivers/hid/hid-ids.h +3 -0
index 5a5248f..f944e37 100644
@@ -823,6 +823,9 @@
 #define USB_DEVICE_ID_SYNAPTICS_HD    0x0ac3
 #define USB_DEVICE_ID_SYNAPTICS_QUAD_HD    0x1ac3
 
+#define USB_VENDOR_ID_TEXAS_INSTRUMENTS    0x2047
+#define USB_DEVICE_ID_TEXAS_INSTRUMENTS_LENOVO_YOGA    0x0855
+
 #define USB_VENDOR_ID_THINGM        0x27b8
 #define USB_DEVICE_ID_BLINK1        0x01ed
 
drivers/hid/hid-sensor-hub.c +3 -0
index 46f4480..597732b 100644
@@ -665,6 +665,9 @@ static const struct hid_device_id 
 sensor_hub_devices[] = {
     { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, 
 USB_VENDOR_ID_INTEL_1,
             USB_DEVICE_ID_INTEL_HID_SENSOR),
             .driver_data = HID_SENSOR_HUB_ENUM_QUIRK},
+    { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, 
 USB_VENDOR_ID_TEXAS_INSTRUMENTS,
+             USB_DEVICE_ID_TEXAS_INSTRUMENTS_LENOVO_YOGA),
+             .driver_data = HID_SENSOR_HUB_ENUM_QUIRK},
Quoted 5 lines
     { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, HID_ANY_ID,
              HID_ANY_ID) },
     { }

Thanks,
Srinivas

#2 lore raw
In reply to Peter F. Patel-Schneider
Quoted 6 lines · Peter F. Patel-Schneider

The sensor hub in Lenovo Yogas needs the enumeration quirk. I've been running the patch for over a month with no problems, whereas the unpatched drivers reliably mis-initialized the sensors. (This is a resending of a previous patch that had formatting issues.)

Now applied. Will be pushing it for 3.15. Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs