From e8e88438008375b17561dcc6a22abc24decf04ac Mon Sep 17 00:00:00 2001 From: Ritesh Raj Sarraf Date: Mon, 5 Oct 2015 22:02:18 +0530 Subject: HID: sensor-hub: Add quirk for Lenovo Yoga 2 with ITE Chips MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch is a follow-up to 47eeca8a48 (" HID: sensor-hub: Add in quirk for Lenovo Yogas with ITE") The Lenovo Yoga 2 13 seems to be sold in multiple variants with minor difference3s. IN my case, the USB ID for ITE chip is different than the Yoga 2 11 and Yoga 3 14. Without the quirk, no data is received from the accelerometer. I have verified the patch, testing this on 4.3-rc4 (and 4.2 stable). With this patch, proper orientation data is received. rrs@learner:~/Community/UpstreamSources/linux-upstream_GIT (stable-42)$ monitor-sensor ** Message: Accelerometer orientation changed: bottom-up ** Message: Light changed: 0.000000 (lux) ±** Message: Accelerometer orientation changed: left-up ** Message: Accelerometer orientation changed: bottom-up ** Message: Accelerometer orientation changed: left-up ** Message: Accelerometer orientation changed: normal ** Message: Light changed: 29.999999 (lux) monitor-sensor can be found in the iio-sensor-proxy tool. Signed-off-by: Ritesh Raj Sarraf Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina --- drivers/hid/hid-sensor-hub.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/hid/hid-sensor-hub.c') diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index 51d51d7b2dad..90116ee1624e 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/drivers/hid/hid-sensor-hub.c @@ -791,6 +791,9 @@ static const struct hid_device_id sensor_hub_devices[] = { { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_ITE, USB_DEVICE_ID_ITE_LENOVO_YOGA), .driver_data = HID_SENSOR_HUB_ENUM_QUIRK}, + { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_ITE, + USB_DEVICE_ID_ITE_LENOVO_YOGA2), + .driver_data = HID_SENSOR_HUB_ENUM_QUIRK}, { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, HID_ANY_ID, HID_ANY_ID) }, { } -- cgit