Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp671664yba; Thu, 18 Apr 2019 07:44:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdU2n4TZlTs0cm3gbFnjuck6yqsT7goiAoh1QDYgHFn4wFAZ96EgwabirN6vKO8Gejn4Il X-Received: by 2002:a63:720e:: with SMTP id n14mr87912085pgc.93.1555598691655; Thu, 18 Apr 2019 07:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555598691; cv=none; d=google.com; s=arc-20160816; b=z1y+vUzTsLN6Tygih8XekmzTkugbu38LJFhatUrSJOVcvhLJNvO6+9vzRQTCEkb7tc TrrUkfWE1MuS7n3FXLmCrn8EXjbgOVSKHlkvCV/pxnBvxmLfg+/vBIgTZDOCepWME6oe KqqiHvdJSLWfj71tjF5vy+HQV5+1oammQWUMRrO+TgO2hfLf+LorKh/wDAMLFcBk0FGo 4Vl+190oJOVZEQgYwvte4Boeb5ExEKKCpCpq7uhV0ebUzU+f4RvnNjEjo5MF5DLq3SBs vlBV2+OdfRilHyPUzQkwp7aecCP9xGF5HE9Qv6VJ33Z/JT8AXgG+VIXGEmd0BLEwwpw2 7bcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=c+A5eaMzv9zYcABexiYDdO2I+1VpcEFtsO96ORTPI3I=; b=loEoRGwvVa6FuVGORvdhME8Ku5oeUdxbrItexnAkwF+oIgfpBbAKmAie6rcqHMkd1k udp5M0eugDfsQ2sbaioICQUVKbeL9ZBxXhaqE5gsXxiOewuVkGqbkZnMx8Qt6GL+FIeW Sg9RQJrL4q4Wou0XbAKPbfzwY+xxUDMcb7m475dMqreW9aQRBn7vxW4slJhTBu2PxH6X NuYUw80liOC97JgFQ9hpvmp4vqUMLQB1zITzYfamqhJr3AtHFqxu+ReFYdRJb83e0z6/ JcNXx1HHwkyuRw0yQBB+fR31eAib33pi7Mc+Qiookm8TL/IRp6WRI431KybrTqYJjciw 7hkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CX0U2wwx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 39si2156359pla.437.2019.04.18.07.44.35; Thu, 18 Apr 2019 07:44:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CX0U2wwx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389347AbfDROnO (ORCPT + 99 others); Thu, 18 Apr 2019 10:43:14 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:36850 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388277AbfDROnN (ORCPT ); Thu, 18 Apr 2019 10:43:13 -0400 Received: by mail-io1-f66.google.com with SMTP id f6so2113975iop.3; Thu, 18 Apr 2019 07:43:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c+A5eaMzv9zYcABexiYDdO2I+1VpcEFtsO96ORTPI3I=; b=CX0U2wwxmEARdNc5X/jPHInm2M28GxG9j5I1lGW0Jx+js6KDkRvKVeWnwEmzK+pwlp VMOcmvElKGRpq3I1F6+azoxAJrPurLeslOMRTWY5P/URcop2p35l/eXGIfz/ER1JfX0x OeARxwJjCSZ4O0x+CW27VmOrHgFrQwbnxxfsmRQE5HmTPlglHdQArF7tJgl8hTdqHbyh Yw2GRxQ+6kfsWu5tfiZlnaQoppxYAydvoQguyQMmmJ/qfd5F7QiYKizLwL6KMb8UT8Pe fNmPH0jfnhsExBVtjvJx0U0zIhR5KRkHzRVuq9sTch5XLlCoS6uwQH6FydBYkoRvWvAE VguQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c+A5eaMzv9zYcABexiYDdO2I+1VpcEFtsO96ORTPI3I=; b=ODMYyazcl37Axwiy6oCk/lGBH4tdGjHbpMzCwdkolHQigdgEUHI7VSKJMUSU0cZqJx fNpu5ZjzG7VgMSX2z92TgnH7g1Ka8NTxCUGD4UjWEqW9aD1ZlH82MaFdJ6oPHZeRmUs/ ZpOqtLi+7z9iGXlsiDTCbOGgNxzYXo3CNNjEjDj7QKyoyfrwaipWC+VQkN8ad+vUwy/N tD50vCUzc7tZUPQ5r2VuG3wy9HY14aXVlzRbD4yKIu4yokICow8vTf5RSG4u+EM2yYMN HLmiXbXsN9yIjgApLsKu3u6r/vE4IfU0Ti0MGHDJmXVw9n+Pfu/tjWmo6De87gQj9MwJ VEgg== X-Gm-Message-State: APjAAAWZgcZTUChrowpVB2hwfLogtwtZsoYX+Rh+6JoUXn3+X42pWEie RP4d8GBZrl3drAA5WJlXJ6XZA4nuW/HJGobvfe0= X-Received: by 2002:a6b:b505:: with SMTP id e5mr62500238iof.277.1555598592936; Thu, 18 Apr 2019 07:43:12 -0700 (PDT) MIME-Version: 1.0 References: <20190415160915.16324-1-jeffrey.l.hugo@gmail.com> <20190415161108.16419-1-jeffrey.l.hugo@gmail.com> In-Reply-To: From: Jeffrey Hugo Date: Thu, 18 Apr 2019 08:43:02 -0600 Message-ID: Subject: Re: [PATCH v3 2/3] HID: quirks: Fix keyboard + touchpad on Lenovo Miix 630 for DT To: Hans de Goede Cc: Benjamin Tissoires , Rob Herring , Mark Rutland , Jiri Kosina , Lee Jones , Bjorn Andersson , Dmitry Torokhov , agross@kernel.org, David Brown , "open list:HID CORE LAYER" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, lkml Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 18, 2019 at 3:51 AM Hans de Goede wrote: > > Hi, > > On 18-04-19 11:34, Benjamin Tissoires wrote: > > On Mon, Apr 15, 2019 at 6:11 PM Jeffrey Hugo wrote: > >> > >> Following up on commit 2bafa1e96254 ("HID: quirks: Fix keyboard + touchpad > >> on Lenovo Miix 630"), the devicetree (DT) identifier for the combo keyboard > >> + touchpad device is "elan,combo400-i2c", which differs from the ACPI ID, > >> thus if we want the quirk to work properly when booting via DT instead of > >> ACPI, we need to key off the DT id as well. > >> > >> Signed-off-by: Jeffrey Hugo > >> --- > >> drivers/hid/hid-quirks.c | 3 ++- > >> 1 file changed, 2 insertions(+), 1 deletion(-) > >> > >> diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c > >> index 77ffba48cc73..00c08f8318b8 100644 > >> --- a/drivers/hid/hid-quirks.c > >> +++ b/drivers/hid/hid-quirks.c > >> @@ -997,7 +997,8 @@ bool hid_ignore(struct hid_device *hdev) > >> return true; > >> /* Same with product id 0x0400 */ > >> if (hdev->product == 0x0400 && > >> - strncmp(hdev->name, "QTEC0001", 8) != 0) > >> + (strncmp(hdev->name, "QTEC0001", 8) != 0 || > >> + strncmp(hdev->name, "elan,combo400-i2c", 17) != 0)) > > > > I think we are taking the problem the wrong way here. > > > > When I first introduced 6ccfe64, I thought 0x0400 would be reserved > > for the elan_i2c touchpads only. But it turns out we are deliberately > > disabling valid HID touchpads hoping that they would be picked up by > > elan_i2c when elan_i2c has its own whitelist of devices. > > > > How about we turn this into list with the matching ones from elan_i2c: > > if ((hdev->product == 0x0400 || hdev->product == 0x0401) && > > (strncmp(hdev->name, "ELAN0000", 8) == 0 || > > strncmp(hdev->name, "ELAN0100", 8) == 0 || > > ... > > strncmp(hdev->name, "ELAN1000", 8) == 0)) > > return true; > > > > So next time we need to force binding a HID touchpad to elan_i2c, we > > can just blacklist here and whitelist it in elan_i2c. > > This indeed sounds like a better way forward with this. This sounds good to me. Let me implement it and test with the Miix 630. Thanks for the suggestion.