Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp539066yba; Fri, 12 Apr 2019 08:32:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzOS8TING/5+6xUzFQStE+Z8Well4I0TJQKXqOQutAkwEVJ2G9AtueA0tBnFz2N7voOz8sy X-Received: by 2002:a17:902:294b:: with SMTP id g69mr8794733plb.57.1555083139656; Fri, 12 Apr 2019 08:32:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555083139; cv=none; d=google.com; s=arc-20160816; b=OFHw362wza1lLP97hshNMDr5imQnYxUqFOcqsk/LT6GZJfyzlP0+YOiwsUguabHVEf gUU1mCfb8ikV/M5al2bdStoWOMa3fSxg3GHXAjAETssnzPeWa0OQtg5UFQGqAAkWRN5T M5yXkV+TVIXLyunlQuup77KJHDL1b9nsP25O6MEg9wIA9jEz1bp5b7lIXUCssmdeyDwZ ZLu7J1pr+fn6dQoNrmEpAMDb6PcZYaDYPhoV/+Qm073BqrfexAsvQNUUAVEAZJbeo9h7 hIdGbdj+u3tfTQs3e+Bz1p+v1M6w0b+H9iAOHLyjGXdYdCirk48653ijoGS/EFyWaOOr /7HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=KqwkC5LpupiQqh+Ai1RgYSzLHx8CCFFRg87GACTQUOs=; b=m4WGL+LlNbYc8BIZna7eM6PKmGLCUSJk7Nz/5tq8fNDdEo7dQo9NckbFz1BRSqAQYC hVfZJzq/cs4HEbbAHrsoFPTN5187zCRNlgW0p1vKLlLWxxPZwbNaGdRs++/Ga2tZJju7 oW1NqitpfTzzk4yn1m8Kni4UbneIL4el6Ds4wErWCLtYWu1PtAsfY/Mle/NoSSU7z5Wh RCBZNzx3iTCgnZqJM8MyLhf7eZJ1D0buXxjweqElo5RXWgHFIuFAzFRrJJPJWmkiFcZs ldBHRjRTLhhrHt3PvUi98Hm0gVz4+U2UWniNv1OoQ55t9Vitw4gaomGFNTJOsz/N06tG qgHw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 73si30011427pfs.186.2019.04.12.08.32.02; Fri, 12 Apr 2019 08:32:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727407AbfDLPas (ORCPT + 99 others); Fri, 12 Apr 2019 11:30:48 -0400 Received: from foss.arm.com ([217.140.101.70]:34846 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727381AbfDLPap (ORCPT ); Fri, 12 Apr 2019 11:30:45 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6305915AB; Fri, 12 Apr 2019 08:30:45 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 915923F557; Fri, 12 Apr 2019 08:30:43 -0700 (PDT) Date: Fri, 12 Apr 2019 16:30:41 +0100 From: Mark Rutland To: Jeffrey Hugo Cc: bjorn.andersson@linaro.org, agross@kernel.org, David Brown , robh+dt@kernel.org, Lee Jones , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] arm64: dts: qcom: Add Lenovo Miix 630 Message-ID: <20190412153040.GB7481@lakrids.cambridge.arm.com> References: <20190411205144.43557-1-jeffrey.l.hugo@gmail.com> <20190412144712.GA7481@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1+11 (2f07cb52) (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 12, 2019 at 09:19:18AM -0600, Jeffrey Hugo wrote: > > > + keyboard@3a { > > > + /* QTEC0001 is the ACPI HID, which could be used for quirks */ > > > + compatible = "QTEC0001", "hid-over-i2c"; > > > > As mentioned last time, please drop the ACPI HID, and allocate a real > > compatible string. > > So, I'm in a quandary with this device. As far as I can tell, its an > off the shelf component, the device adheres to the "PNP0C50" spec (HID > over I2C), and can be driven by the full "hid-over-i2c" driver (which > is just a DT shim over the PNP0C50 ACPI driver). However, the device > itself identifies itself as an ELAN 400 device, which is an ID that is > also used for standalone touchpad devices. Per my understanding of > the Linux drivers, there is a separate ELAN driver for the standalone > touchpad devices as its been discovered though trial and error that > the Linux PNP0C50 driver cannot drive those devices. To handle this, > there is a quirk in hid-quirks which rejects ELAN 400 devices, except > those which are "QTEC0001". > > We need that quirk bypass for this device because the ELAN driver > cannot handle this device. This is useful context; thanks for writing this up! > I'd much rather have a single identifier to quirk on, rather than > having one for DT and one for ACPI, and its not looking feasible to > get the vendor to update the ACPI, so it seems like using the ACPI > identifier is just simpler. > > So, if you want a different compatible string, I'll need to go put DT > in a driver that is primarily ACPI. I'm not sure what the HID folks > will think of that. My objection is that an ACPI HID is _not_ a DT compatible string, and the two should be treated separately. Munging the two together opens the door for other pain. The driver in question has a DT probe function, i2c_hid_of_probe, so there's certainly a place to wire up that quirk. > I'll propose it, but what do you view is a > "proper" compatible string? "ELAN0400-msm8998-clamshell"? A proper compatible string has a vendor-prefix, and is documented somewhere in Documentation/devicetree/bindings. e.g. you could allocate something like: "qcom,msm8998-clamshell-hid-over-i2c" Thanks, Mark.