HID: sensor-hub: add sensor hub quirk for ThinkPad Helix
authorStephen Chandler Paul <thatslyude@gmail.com>
Thu, 3 Apr 2014 20:27:55 +0000 (16:27 -0400)
committerJiri Kosina <jkosina@suse.cz>
Thu, 3 Apr 2014 20:47:28 +0000 (22:47 +0200)
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.

Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-ids.h
drivers/hid/hid-sensor-hub.c

index bd221263c739d61f8df1be33b0a0ea0181d76657..3312f1b568efbe18af2ebaa1d14ba4ac30b311ca 100644 (file)
 
 #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
index 5182031f7b520052f6a8f51588faf3bc839353e0..af8244b1c1f428dab026544802ca951089a02fd1 100644 (file)
@@ -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),