From patchwork Sat Jul 15 12:27:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Pedersen X-Patchwork-Id: 9842347 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 89B9D60212 for ; Sat, 15 Jul 2017 12:27:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F5E428707 for ; Sat, 15 Jul 2017 12:27:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6343E28733; Sat, 15 Jul 2017 12:27:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 008FD28707 for ; Sat, 15 Jul 2017 12:27:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751220AbdGOM11 (ORCPT ); Sat, 15 Jul 2017 08:27:27 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33104 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751208AbdGOM10 (ORCPT ); Sat, 15 Jul 2017 08:27:26 -0400 Received: by mail-wm0-f67.google.com with SMTP id j85so15097333wmj.0; Sat, 15 Jul 2017 05:27:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=nOXgHmwTWTaBK7I2Y223mW2iOjkruNCsdgxmj4P5NB4=; b=cLsA72Cgi+JSlSZGgrRUbVXrC/K39n/QjP9gWdzTJy242p8/SV+aUnOAY4xacQAVcq LvZKhRm6J+R/CtMZm7crSZ+KzSYnasSiHPXTzixPP+qxd4ufuhnBUcyLo9Qtevw+uXUc YFZ/VZu/P52MvNw/PBNdaEB292+QahHMy3h8KUOM/cUCvoAMvsW5XW+TPPDi98K/y2sU BzqXkYF7CwNbcRM7iDuSACIGpJc9nS/S/Av6WmOEL4V1K3kVGU4D5f6mijKnZB2nzZX/ fZpvjXQPoLyIKHaKqeD2gZkuVNtB4kfkRGwXueSefrOLH2J0Do+w0PQTAnKTOUrD7Fk+ 2QCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=nOXgHmwTWTaBK7I2Y223mW2iOjkruNCsdgxmj4P5NB4=; b=H77iXuVgzP7GAxvRTcb8jzr6JJPrrbT5PtMZpY51KNGEKxVOb8QCgC+O4ywI5oyL7r XbDmKbVJS9BvrxOy1yhMp/D0H7dpy7uEv+gh0bC3Bg8m9GjYFG7OKl9Z9PaJ4R0AYbnk KH4qNijux+nAcvyND7AuguFiMAfdOeVzBJFX58B3803foWukLmu2N4FeRXqTKyIxu2dx oTJP4IdSqJaU+B8bRDNaCzF04GP4XYD8XVzRwk5Lr997hmqCGdtmY/OStUdZeGthGhde hGCNSAH9Hpv37VNgBJDFI99+f2cXTyAbi9zbfioMYJ3qp6qkgsrzbtRjE95yZZD4YH14 SyCw== X-Gm-Message-State: AIVw110y95dKt90XGpoILOGod1Zus6pVM/UTPdTV0BLzfEHMzPabnCPk Tq8Qc9eqxpyrUZoqJjI= X-Received: by 10.28.103.132 with SMTP id b126mr1047899wmc.10.1500121644866; Sat, 15 Jul 2017 05:27:24 -0700 (PDT) Received: from localhost.localdomain (ip-37-188-188-97.eurotel.cz. [37.188.188.97]) by smtp.googlemail.com with ESMTPSA id o16sm2873314wro.56.2017.07.15.05.27.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Jul 2017 05:27:24 -0700 (PDT) From: Patrick Pedersen To: jikos@kernel.org Cc: benjamin.tissoires@redhat.com, jic23@kernel.org, srinivas.pandruvada@linux.intel.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org Subject: [PATCH] HID: Add quirk for Lenovo Yoga 910 with ITE Chips Date: Sat, 15 Jul 2017 14:27:21 +0200 Message-Id: <20170715122721.6908-1-ctx.xda@gmail.com> X-Mailer: git-send-email 2.13.3 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As with previous generations of this device (see https://patchwork.kernel.org/patch/7887361/), the ITE HID Sensor Hub, responsible for the accelerometer and als sensor, requires a quirk entry. Without the entry, the Sensor Hub can't be accessed and the kernel fails to report any movements. As a result iio-sensor-proxy receives no new data. It shall additionally be noted that the i2c-hid 'sleep' bug (present since kernel ver. 4.3) still affects the driver. This means that the sensor hub will not report any movement, until the device is suspended and resumed. Signed-off-by: Patrick Pedersen --- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-sensor-hub.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 4f9a3938189a..b427a0bcfbe8 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -565,6 +565,7 @@ #define USB_DEVICE_ID_ITE_LENOVO_YOGA 0x8386 #define USB_DEVICE_ID_ITE_LENOVO_YOGA2 0x8350 #define USB_DEVICE_ID_ITE_LENOVO_YOGA900 0x8396 +#define USB_DEVICE_ID_ITE_LENOVO_YOGA910 0x8186 #define USB_VENDOR_ID_JABRA 0x0b0e #define USB_DEVICE_ID_JABRA_SPEAK_410 0x0412 diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index 4ef73374a8f9..85b8425483bd 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/drivers/hid/hid-sensor-hub.c @@ -820,6 +820,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_YOGA900), .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_YOGA910), + .driver_data = HID_SENSOR_HUB_ENUM_QUIRK}, { HID_DEVICE(HID_BUS_ANY, HID_GROUP_SENSOR_HUB, USB_VENDOR_ID_INTEL_0, 0x22D8), .driver_data = HID_SENSOR_HUB_ENUM_QUIRK},