Skip to contentSkip to conversation

Add sensor hub quirk for ThinkPad Helix

PATCH Applied Stephen Chandler Paul 3 participants 3 messages Apr 3, 2014

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

PATCH 1/1 Add sensor hub quirk for ThinkPad Helix

Just like some of the other laptops/tablets on the market with ultrabook sensors, the ThinkPad Helix's sensor hub requires a special quirk in order for it to power on properly. Without it the sensors are detected by the kernel and set up as usual, but they won't output any data. This will also fix the sensors on any other laptops with the same model of sensor hub.

---
 drivers/hid/hid-ids.h        | 3 ++-
 drivers/hid/hid-sensor-hub.c | 7 +++++--
 2 files changed, 7 insertions(+), 3 deletions(-)
drivers/hid/hid-ids.h +2 -1
index bd22126..3312f1b5 100644
@@ -455,7 +455,8 @@
 
 #define USB_VENDOR_ID_INTEL_0		0x8086
 #define USB_VENDOR_ID_INTEL_1		0x8087
-#define USB_DEVICE_ID_INTEL_HID_SENSOR	0x09fa
+#define USB_DEVICE_ID_INTEL_HID_SENSOR_0	0x09fa
+#define USB_DEVICE_ID_INTEL_HID_SENSOR_1	0x0a04
 
 #define USB_VENDOR_ID_STM_0             0x0483
 #define USB_DEVICE_ID_STM_HID_SENSOR    0x91d1
drivers/hid/hid-sensor-hub.c +5 -2
index 5182031..af8244b 100644
@@ -697,10 +697,13 @@ static void sensor_hub_remove(struct hid_device *hdev)
 
 static const struct hid_device_id sensor_hub_devices[] = {
 	{ HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_INTEL_0,
-			USB_DEVICE_ID_INTEL_HID_SENSOR),
+			USB_DEVICE_ID_INTEL_HID_SENSOR_0),
 			.driver_data = HID_SENSOR_HUB_ENUM_QUIRK},
 	{ HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_INTEL_1,
-			USB_DEVICE_ID_INTEL_HID_SENSOR),
+			USB_DEVICE_ID_INTEL_HID_SENSOR_0),
+			.driver_data = HID_SENSOR_HUB_ENUM_QUIRK},
+	{ HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_INTEL_1,
+			USB_DEVICE_ID_INTEL_HID_SENSOR_1),
 			.driver_data = HID_SENSOR_HUB_ENUM_QUIRK},
 	{ HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_STM_0,
 			USB_DEVICE_ID_STM_HID_SENSOR),
Signature · 1 line
1.8.3.2
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 37 lines · Stephen Chandler Paul

Just like some of the other laptops/tablets on the market with ultrabook sensors, the ThinkPad Helix's sensor hub requires a special quirk in order for it to power on properly. Without it the sensors are detected by the kernel and set up as usual, but they won't output any data. This will also fix the sensors on any other laptops with the same model of sensor hub.

---
  drivers/hid/hid-ids.h        | 3 ++-
  drivers/hid/hid-sensor-hub.c | 7 +++++--
  2 files changed, 7 insertions(+), 3 deletions(-)
drivers/hid/hid-ids.h +2 -1
index bd22126..3312f1b5 100644
@@ -455,7 +455,8 @@
 
  #define USB_VENDOR_ID_INTEL_0		0x8086
  #define USB_VENDOR_ID_INTEL_1		0x8087
-#define USB_DEVICE_ID_INTEL_HID_SENSOR	0x09fa
+#define USB_DEVICE_ID_INTEL_HID_SENSOR_0	0x09fa
+#define USB_DEVICE_ID_INTEL_HID_SENSOR_1	0x0a04
 
  #define USB_VENDOR_ID_STM_0             0x0483
  #define USB_DEVICE_ID_STM_HID_SENSOR    0x91d1
drivers/hid/hid-sensor-hub.c +1 -1
index 5182031..af8244b 100644
@@ -697,10 +697,13 @@ static void sensor_hub_remove(struct hid_device *hdev)
 
  static const struct hid_device_id sensor_hub_devices[] = {
  	{ HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_INTEL_0,
-			USB_DEVICE_ID_INTEL_HID_SENSOR),
+			USB_DEVICE_ID_INTEL_HID_SENSOR_0),

drivers/hid/hid-sensor-hub.c static void sensor_hub_remove(struct hid_device *hdev) · line 709

Quoted 10 lines
drivers/hid/hid-sensor-hub.c +4 -1
  			.driver_data = HID_SENSOR_HUB_ENUM_QUIRK},
  	{ HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_INTEL_1,
-			USB_DEVICE_ID_INTEL_HID_SENSOR),
+			USB_DEVICE_ID_INTEL_HID_SENSOR_0),
+			.driver_data = HID_SENSOR_HUB_ENUM_QUIRK},
+	{ HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_INTEL_1,
+			USB_DEVICE_ID_INTEL_HID_SENSOR_1),
  			.driver_data = HID_SENSOR_HUB_ENUM_QUIRK},
  	{ HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_STM_0,
  			USB_DEVICE_ID_STM_HID_SENSOR),

Thanks,
Srinivas

Applied
#2 lore raw
In reply to Stephen Chandler Paul
Quoted 8 lines · Stephen Chandler Paul

Just like some of the other laptops/tablets on the market with ultrabook sensors, the ThinkPad Helix's sensor hub requires a special quirk in order for it to power on properly. Without it the sensors are detected by the kernel and set up as usual, but they won't output any data. This will also fix the sensors on any other laptops with the same model of sensor hub.

Queued for 3.15, thanks.

Signature · 2 lines
Jiri Kosina
SUSE Labs