Skip to contentSkip to conversation

Add quirk for Lenovo Yoga 2 with ITE Chips

PATCH In review Ritesh Raj Sarraf 4 participants 5 messages Oct 5, 2015

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

PATCH 1/1 Add quirk for Lenovo Yoga 2 with ITE Chips

---
 drivers/hid/hid-ids.h        | 1 +
 drivers/hid/hid-sensor-hub.c | 3 +++
 2 files changed, 4 insertions(+)
drivers/hid/hid-ids.h +1 -0
index f769208..127c777 100644
@@ -510,6 +510,7 @@
 
 #define USB_VENDOR_ID_ITE               0x048d
 #define USB_DEVICE_ID_ITE_LENOVO_YOGA   0x8386
+#define USB_DEVICE_ID_ITE_LENOVO_YOGA2  0x8350
 
 #define USB_VENDOR_ID_JABRA		0x0b0e
 #define USB_DEVICE_ID_JABRA_SPEAK_410	0x0412
drivers/hid/hid-sensor-hub.c +3 -0
index a76eb2a..05afa25 100644
@@ -777,6 +777,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) },
 	{ }
Signature · 1 line
2.5.3
maintainer
#1 lore raw
Quoted 5 lines · Ritesh Raj Sarraf
---
 drivers/hid/hid-ids.h        | 1 +
 drivers/hid/hid-sensor-hub.c | 3 +++
 2 files changed, 4 insertions(+)

Please use scripts/get_maintainer.pl for who to send such patches too.

Also, this is not how to get a patch into the stable kernel tree, please read Documentation/stable_kernel_rules.txt for how to do that.

thanks,

greg k-h

maintainer
#2 lore raw
In reply to Ritesh Raj Sarraf

On Mon, 5 Oct 2015, Ritesh Raj Sarraf wrote:

Please insert a little bit more verbose changelog here (what exactly this device is, why does it need such quirk, etc).

Quoted 1 line

Adding Srinivas to CC as well.

Quoted 31 lines
---
 drivers/hid/hid-ids.h        | 1 +
 drivers/hid/hid-sensor-hub.c | 3 +++
 2 files changed, 4 insertions(+)
drivers/hid/hid-ids.h +1 -0
index f769208..127c777 100644
@@ -510,6 +510,7 @@
 
 #define USB_VENDOR_ID_ITE               0x048d
 #define USB_DEVICE_ID_ITE_LENOVO_YOGA   0x8386
+#define USB_DEVICE_ID_ITE_LENOVO_YOGA2  0x8350
 
 #define USB_VENDOR_ID_JABRA		0x0b0e
 #define USB_DEVICE_ID_JABRA_SPEAK_410	0x0412
drivers/hid/hid-sensor-hub.c +3 -0
index a76eb2a..05afa25 100644
@@ -777,6 +777,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) },
 	{ }
Signature · 2 lines
Jiri Kosina
SUSE Labs
#3 lore raw
Quoted 9 lines · Jiri Kosina

On Mon, 5 Oct 2015, Ritesh Raj Sarraf wrote:

Please insert a little bit more verbose changelog here (what exactly this
device is, why does it need such quirk, etc).

Quoted 1 line

Adding Srinivas to CC as well.

Dropping stable

This patch is a follow-up to the one below. The USB ID is different for the Lenovo Yoga 2 13. What Guilhem sent you was verified against Yoga 2 11 and Yoga 3 14. I guess this product line comes with a couple of variants.

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.

commit 47eeca8a4838714e582c2a3058458408a328ed60
Author: Guilhem Lettron <[email protected]>
Date:   Sat Jun 27 17:02:23 2015 +0200

    HID: sensor-hub: Add in quirk for Lenovo Yogas with ITE
    Like yogas with TEXAS_INSTRUMENTS, yogas with ITE chips needs to be initialized with enumeration quirks.

Signature · 2 lines
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
#4 lore raw
Quoted 13 lines · Ritesh Raj Sarraf
Quoted 9 lines · Jiri Kosina

On Mon, 5 Oct 2015, Ritesh Raj Sarraf wrote:

Please insert a little bit more verbose changelog here (what exactly this
device is, why does it need such quirk, etc).

Quoted 1 line

Adding Srinivas to CC as well.

Dropping stable

Quoted 9 lines

This patch is a follow-up to the one below. The USB ID is different for the Lenovo Yoga 2 13. What Guilhem sent you was verified against Yoga 2 11 and Yoga 3 14. I guess this product line comes with a couple of variants.

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.

Please add the above in the description including with the commit id for the previous Yoga quirk and resend.

Thanks,
Srinivas

Quoted 26 lines

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.

commit 47eeca8a4838714e582c2a3058458408a328ed60

Author: Guilhem Lettron <[email protected]>
Date:   Sat Jun 27 17:02:23 2015 +0200

HID: sensor-hub: Add in quirk for Lenovo Yogas with ITE

Like yogas with TEXAS_INSTRUMENTS, yogas with ITE chips needs to be initialized with enumeration quirks.